Skip to content

Commit

Permalink
pwm: zx: Add missing cleanup in error path
Browse files Browse the repository at this point in the history
[ Upstream commit 269effd ]

zx_pwm_probe() called clk_prepare_enable() before; this must be undone
in the error path.

Fixes: 4836193 ("pwm: Add ZTE ZX PWM device driver")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
ukleinek authored and gregkh committed Dec 30, 2020
1 parent 91877b1 commit 00fb97e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/pwm/pwm-zx.c
Expand Up @@ -238,6 +238,7 @@ static int zx_pwm_probe(struct platform_device *pdev)
ret = pwmchip_add(&zpc->chip);
if (ret < 0) {
dev_err(&pdev->dev, "failed to add PWM chip: %d\n", ret);
clk_disable_unprepare(zpc->pclk);
return ret;
}

Expand Down

0 comments on commit 00fb97e

Please sign in to comment.