]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cpufreq: loongson2: Unregister platform_driver on failure
authorYuan Can <yuancan@huawei.com>
Wed, 16 Oct 2024 09:06:15 +0000 (17:06 +0800)
committerViresh Kumar <viresh.kumar@linaro.org>
Wed, 16 Oct 2024 09:50:21 +0000 (15:20 +0530)
commit5f856d71ccdf89b4bac0ff70ebb0bb582e7f7f18
treeeaef23b0e14312b66852ed24e7096d3853890d04
parent41baf662a0c2cfab90d968c122f76aaeda433027
cpufreq: loongson2: Unregister platform_driver on failure

When cpufreq_register_driver() returns error, the cpufreq_init() returns
without unregister platform_driver, fix by add missing
platform_driver_unregister() when cpufreq_register_driver() failed.

Fixes: f8ede0f700f5 ("MIPS: Loongson 2F: Add CPU frequency scaling support")
Signed-off-by: Yuan Can <yuancan@huawei.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/loongson2_cpufreq.c