diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2020-10-13 11:13:21 +0300 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2020-12-17 16:18:48 +0300 |
commit | 269effd03f6142df4c74814cfdd5f0b041b30bf9 (patch) | |
tree | a956c5aee1cf1a9ac6d00548c1e703c96fd9d429 | |
parent | 2e978a4564b82c0b5e31e23f5e7ea8bb9d6a23f7 (diff) | |
download | linux-269effd03f6142df4c74814cfdd5f0b041b30bf9.tar.xz |
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>
-rw-r--r-- | drivers/pwm/pwm-zx.c | 1 |
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; } |