summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon South <simon@simonsouth.net>2021-01-19 19:12:06 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-04 12:26:36 +0300
commite8ba75011695ca7c317b043bf7bbd73100c3b7ee (patch)
tree359b7588b57d1be333b4907e9e1c065f7b73b085
parent3a9044ea78ead56f52c1542f7019b4fbc67a4301 (diff)
downloadlinux-e8ba75011695ca7c317b043bf7bbd73100c3b7ee.tar.xz
pwm: rockchip: rockchip_pwm_probe(): Remove superfluous clk_unprepare()
[ Upstream commit d5d8d675865ccddfe4da26c85f22c55cec663bf2 ] 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: 48cf973cae33 ("pwm: rockchip: Avoid glitches on already running PWMs") Signed-off-by: Simon South <simon@simonsouth.net> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/pwm/pwm-rockchip.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c
index 73352e6fbccb..6ad6aad215cf 100644
--- a/drivers/pwm/pwm-rockchip.c
+++ b/drivers/pwm/pwm-rockchip.c
@@ -361,7 +361,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;
}