提交 e82c7900 编写于 作者: S Simon South 提交者: Zheng Zengkai

pwm: rockchip: rockchip_pwm_probe(): Remove superfluous clk_unprepare()

stable inclusion
from stable-5.10.20
commit 6f503e4e3752edf44188fb1da78e97b6198d5042
bugzilla: 50608

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

[ Upstream commit d5d8d675 ]

If rockchip_pwm_probe() fails to register a PWM device it calls
clk_unprepare() for the device's PWM clock, without having first disabled
the clock and before jumping to an error handler that also unprepares
it. This is likely to produce warnings from the kernel about the clock
being unprepared when it is still enabled, and then being unprepared when
it has already been unprepared.

Prevent these warnings by removing this unnecessary call to
clk_unprepare().

Fixes: 48cf973c ("pwm: rockchip: Avoid glitches on already running PWMs")
Signed-off-by: NSimon South <simon@simonsouth.net>
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>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 bac46ff8
......@@ -353,7 +353,6 @@ static int rockchip_pwm_probe(struct platform_device *pdev)
ret = pwmchip_add(&pc->chip);
if (ret < 0) {
clk_unprepare(pc->clk);
dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret);
goto err_pclk;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册