summaryrefslogtreecommitdiff
path: root/drivers/pwm
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2020-10-13 10:13:21 +0200
committerThierry Reding <thierry.reding@gmail.com>2020-12-17 14:18:48 +0100
commit269effd03f6142df4c74814cfdd5f0b041b30bf9 (patch)
treea956c5aee1cf1a9ac6d00548c1e703c96fd9d429 /drivers/pwm
parent2e978a4564b82c0b5e31e23f5e7ea8bb9d6a23f7 (diff)
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: 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>
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 0f5e8919b034..34e91195ce98 100644
--- a/drivers/pwm/pwm-zx.c
+++ b/drivers/pwm/pwm-zx.c
@@ -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;
}