[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231222104651.167821-1-sean@mess.org>
Date: Fri, 22 Dec 2023 10:46:51 +0000
From: Sean Young <sean@...s.org>
To: Thierry Reding <thierry.reding@...il.com>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
Ray Jui <rjui@...adcom.com>,
Scott Branden <sbranden@...adcom.com>
Cc: Sean Young <sean@...s.org>,
linux-pwm@...r.kernel.org,
linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] pwm: bcm2835: Duplicate call to clk_rate_exclusive_put in error path
devm_add_action_or_reset() already calls the action in the error case.
Reported-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
Closes: https://lore.kernel.org/linux-pwm/fuku3b5ur6y4k4refd3vmeoenzjo6mwe3b3gtel34rhhhtvnsa@w4uktgbqsc3w/
Signed-off-by: Sean Young <sean@...s.org>
---
drivers/pwm/pwm-bcm2835.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c
index 307c0bd5f885..283cf27f25ba 100644
--- a/drivers/pwm/pwm-bcm2835.c
+++ b/drivers/pwm/pwm-bcm2835.c
@@ -160,10 +160,8 @@ static int bcm2835_pwm_probe(struct platform_device *pdev)
ret = devm_add_action_or_reset(&pdev->dev, devm_clk_rate_exclusive_put,
pc->clk);
- if (ret) {
- clk_rate_exclusive_put(pc->clk);
+ if (ret)
return ret;
- }
pc->rate = clk_get_rate(pc->clk);
if (!pc->rate)
--
2.43.0
Powered by blists - more mailing lists