cpufreq: brcmstb-avs-cpufreq: Fix resource leaks in ->remove()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 17 Jan 2021 14:26:44 +0000 (15:26 +0100)
committerViresh Kumar <viresh.kumar@linaro.org>
Mon, 18 Jan 2021 06:53:43 +0000 (12:23 +0530)
If 'cpufreq_unregister_driver()' fails, just WARN and continue, so that
other resources are freed.

Fixes: de322e085995 ("cpufreq: brcmstb-avs-cpufreq: AVS CPUfreq driver for Broadcom STB SoCs")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
[ Viresh: Updated Subject ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/brcmstb-avs-cpufreq.c

index e25ccb7..4153150 100644 (file)
@@ -754,8 +754,7 @@ static int brcm_avs_cpufreq_remove(struct platform_device *pdev)
        int ret;
 
        ret = cpufreq_unregister_driver(&brcm_avs_driver);
-       if (ret)
-               return ret;
+       WARN_ON(ret);
 
        brcm_avs_prepare_uninit(pdev);