pwm: rockchip: rockchip_pwm_probe(): Remove superfluous clk_unprepare()
authorSimon South <simon@simonsouth.net>
Tue, 19 Jan 2021 16:12:06 +0000 (11:12 -0500)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 20 Jan 2021 17:12:46 +0000 (18:12 +0100)
commitd5d8d675865ccddfe4da26c85f22c55cec663bf2
tree052747d51086712ff6b24e37fe260765b05dda1d
parentd9b657a5cdbd960de35dee7e06473caf44a9016f
pwm: rockchip: rockchip_pwm_probe(): Remove superfluous clk_unprepare()

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>
drivers/pwm/pwm-rockchip.c