summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/mediatek-cpufreq-hw.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-02-07 22:59:09 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-02-09 22:19:18 +0300
commitdd329e1e21b54c73f58a440b6164d04d8a7fc542 (patch)
treea0b3ce71c44bcd24097615cb3778942207e8e5fa /drivers/cpufreq/mediatek-cpufreq-hw.c
parentced3960aa0f09329675209c6004bfc4025cc1f26 (diff)
downloadlinux-dd329e1e21b54c73f58a440b6164d04d8a7fc542.tar.xz
cpufreq: Make cpufreq_unregister_driver() return void
All but a few drivers ignore the return value of cpufreq_unregister_driver(). Those few that don't only call it after cpufreq_register_driver() succeeded, in which case the call doesn't fail. Make the function return no value and add a WARN_ON for the case that the function is called in an invalid situation (i.e. without a previous successful call to cpufreq_register_driver()). Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Florian Fainelli <f.fainelli@gmail.com> # brcmstb-avs-cpufreq.c Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/mediatek-cpufreq-hw.c')
-rw-r--r--drivers/cpufreq/mediatek-cpufreq-hw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/cpufreq/mediatek-cpufreq-hw.c b/drivers/cpufreq/mediatek-cpufreq-hw.c
index f80339779084..f21a9e3df53d 100644
--- a/drivers/cpufreq/mediatek-cpufreq-hw.c
+++ b/drivers/cpufreq/mediatek-cpufreq-hw.c
@@ -317,7 +317,9 @@ static int mtk_cpufreq_hw_driver_probe(struct platform_device *pdev)
static int mtk_cpufreq_hw_driver_remove(struct platform_device *pdev)
{
- return cpufreq_unregister_driver(&cpufreq_mtk_hw_driver);
+ cpufreq_unregister_driver(&cpufreq_mtk_hw_driver);
+
+ return 0;
}
static const struct of_device_id mtk_cpufreq_hw_match[] = {