Skip to content

Commit 678164a

Browse files
seanyoungUwe Kleine-König
authored andcommitted
pwm: bcm2835: Remove duplicate call to clk_rate_exclusive_put()
devm_add_action_or_reset() already calls the action in the error case. Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Closes: https://lore.kernel.org/linux-pwm/fuku3b5ur6y4k4refd3vmeoenzjo6mwe3b3gtel34rhhhtvnsa@w4uktgbqsc3w/ Fixes: fcc7607 ("pwm: bcm2835: Allow PWM driver to be used in atomic context") Signed-off-by: Sean Young <sean@mess.org> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://lore.kernel.org/r/20231222131312.174491-1-sean@mess.org Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
1 parent 7afc0e7 commit 678164a

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/pwm/pwm-bcm2835.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,8 @@ static int bcm2835_pwm_probe(struct platform_device *pdev)
160160

161161
ret = devm_add_action_or_reset(&pdev->dev, devm_clk_rate_exclusive_put,
162162
pc->clk);
163-
if (ret) {
164-
clk_rate_exclusive_put(pc->clk);
163+
if (ret)
165164
return ret;
166-
}
167165

168166
pc->rate = clk_get_rate(pc->clk);
169167
if (!pc->rate)

0 commit comments

Comments
 (0)