diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2021-01-17 17:26:44 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-04 13:37:24 +0300 |
commit | 88cd0e882f1e05a0bb7d350ed89e1b0b3702c6a6 (patch) | |
tree | e15734f3fae2da579ea6555aed200c8d09d625da | |
parent | de17aa73c9d9f84ee21e4a7b4568c3b6c3cb9e33 (diff) | |
download | linux-88cd0e882f1e05a0bb7d350ed89e1b0b3702c6a6.tar.xz |
cpufreq: brcmstb-avs-cpufreq: Fix resource leaks in ->remove()
[ Upstream commit 3657f729b6fb5f2c0bf693742de2dcd49c572aa1 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/cpufreq/brcmstb-avs-cpufreq.c | 3 |
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); |