Commit 678164a5 authored by Sean Young's avatar Sean Young Committed by Uwe Kleine-König

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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Closes: https://lore.kernel.org/linux-pwm/fuku3b5ur6y4k4refd3vmeoenzjo6mwe3b3gtel34rhhhtvnsa@w4uktgbqsc3w/
Fixes: fcc76072 ("pwm: bcm2835: Allow PWM driver to be used in atomic context")
Signed-off-by: default avatarSean Young <sean@mess.org>
Reviewed-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/20231222131312.174491-1-sean@mess.orgSigned-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
parent 7afc0e7f
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment