]> git.proxmox.com Git - mirror_ubuntu-hirsute-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)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 15 Mar 2021 14:09:29 +0000 (15:09 +0100)
commit02c020e4fb2089e35389066a34576e1174dfb8be
tree1d8684437c037ae2a21c4b7ab12386912238561c
parent7629a4d7e22367802fdab26174aa2fd6f62c0bde
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>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/pwm/pwm-rockchip.c