[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210117142644.568738-1-christophe.jaillet@wanadoo.fr>
Date: Sun, 17 Jan 2021 15:26:44 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: mmayer@...adcom.com, bcm-kernel-feedback-list@...adcom.com,
rjw@...ysocki.net, viresh.kumar@...aro.org, f.fainelli@...il.com
Cc: linux-pm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: [PATCH v2 2/2] cpufreq: brcmstb-avs-cpufreq: Fix some resource leaks in the remove function
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@...adoo.fr>
---
v1->v2: New patch
---
drivers/cpufreq/brcmstb-avs-cpufreq.c | 3 +--
1 file changed, 1 insertion(+), 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);
--
2.27.0
Powered by blists - more mailing lists