From: Sean Young Date: Fri, 22 Dec 2023 13:13:11 +0000 (+0000) Subject: pwm: bcm2835: Remove duplicate call to clk_rate_exclusive_put() X-Git-Tag: v6.8-rc1~40^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=678164a5f0ecd6e0134ce246d64ae7345f8de59c;p=thirdparty%2Fkernel%2Flinux.git 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 Closes: https://lore.kernel.org/linux-pwm/fuku3b5ur6y4k4refd3vmeoenzjo6mwe3b3gtel34rhhhtvnsa@w4uktgbqsc3w/ Fixes: fcc760729359 ("pwm: bcm2835: Allow PWM driver to be used in atomic context") Signed-off-by: Sean Young Reviewed-by: Uwe Kleine-König Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20231222131312.174491-1-sean@mess.org Signed-off-by: Uwe Kleine-König --- diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c index 307c0bd5f8855..283cf27f25bae 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)