summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2021-01-17 15:26:44 +0100
committerViresh Kumar <viresh.kumar@linaro.org>2021-01-18 07:53:43 +0100
commit3657f729b6fb5f2c0bf693742de2dcd49c572aa1 (patch)
tree572111f131aac69f63a0c346b70cac262c71113e /drivers/cpufreq
parentcpufreq: brcmstb-avs-cpufreq: Free resources in error path (diff)
downloadlinux-3657f729b6fb5f2c0bf693742de2dcd49c572aa1.tar.xz
linux-3657f729b6fb5f2c0bf693742de2dcd49c572aa1.zip
cpufreq: brcmstb-avs-cpufreq: Fix resource leaks in ->remove()
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>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/brcmstb-avs-cpufreq.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/cpufreq/brcmstb-avs-cpufreq.c b/drivers/cpufreq/brcmstb-avs-cpufreq.c
index e25ccb744187..4153150e20db 100644
--- a/drivers/cpufreq/brcmstb-avs-cpufreq.c
+++ b/drivers/cpufreq/brcmstb-avs-cpufreq.c
@@ -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);