]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Apr 2021 16:31:34 +0000 (18:31 +0200)
commit521447dec5656941e7757320ee3b96c49435703a
tree369776b8dcd0d23ae2eba0031f7692e33a76ece8
parentd6cea94c6a565b7dd92f12a95ac1432219026794
pwm: rockchip: rockchip_pwm_probe(): Remove superfluous clk_unprepare()

BugLink: https://bugs.launchpad.net/bugs/1918974
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/pwm/pwm-rockchip.c