summaryrefslogtreecommitdiff
path: root/drivers/pwm
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2020-10-13 11:13:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-29 15:47:03 +0300
commit1bac99796304584cf17766323c3b52c091fe46fb (patch)
tree93f1dfb180fa65f4ca560b29c60d16ce62a241e2 /drivers/pwm
parent36237bb655e9038c47974636e92ecc7b9835e090 (diff)
downloadlinux-1bac99796304584cf17766323c3b52c091fe46fb.tar.xz
pwm: zx: Add missing cleanup in error path
[ Upstream commit 269effd03f6142df4c74814cfdd5f0b041b30bf9 ] zx_pwm_probe() called clk_prepare_enable() before; this must be undone in the error path. Fixes: 4836193c435c ("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>
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/pwm-zx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-zx.c b/drivers/pwm/pwm-zx.c
index 5d27c16edfb1..0d4112410b69 100644
--- a/drivers/pwm/pwm-zx.c
+++ b/drivers/pwm/pwm-zx.c
@@ -241,6 +241,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;
}