mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
pwm: zx: Add missing cleanup in error path
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>
This commit is contained in:
parent
2e978a4564
commit
269effd03f
1 changed files with 1 additions and 0 deletions
|
@ -236,6 +236,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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue