diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2020-10-13 10:13:21 +0200 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2020-12-17 14:18:48 +0100 |
commit | 269effd03f6142df4c74814cfdd5f0b041b30bf9 (patch) | |
tree | a956c5aee1cf1a9ac6d00548c1e703c96fd9d429 /drivers/pwm | |
parent | pwm: ab8500: Add error message if pwmchip_add() fails (diff) | |
download | linux-269effd03f6142df4c74814cfdd5f0b041b30bf9.tar.xz linux-269effd03f6142df4c74814cfdd5f0b041b30bf9.zip |
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.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; } |