mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
pwm: zx: Add missing cleanup in error path
[ Upstream commit269effd03f] zx_pwm_probe() called clk_prepare_enable() before; this must be undone in the error path. Fixes:4836193c43("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
91877b1fb0
commit
00fb97e2d7
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user