提交 20a37513 编写于 作者: U Uwe Kleine-König 提交者: Xie XiuQi

pwm: zx: Add missing cleanup in error path

stable inclusion
from stable-5.10.4
commit 00fb97e2d7c8f05752699bce9ee1afe39523f949
bugzilla: 46903

--------------------------------

[ Upstream commit 269effd0 ]

zx_pwm_probe() called clk_prepare_enable() before; this must be undone
in the error path.

Fixes: 4836193c ("pwm: Add ZTE ZX PWM device driver")
Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: NShawn Guo <shawn.guo@linaro.org>
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 62f75b04
......@@ -238,6 +238,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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册