bus: ti-sysc: Fix error handling for sysc_check_active_timer()
authorTony Lindgren <tony@atomide.com>
Wed, 11 Aug 2021 05:34:46 +0000 (08:34 +0300)
committerSasha Levin <sashal@kernel.org>
Thu, 26 Aug 2021 12:35:42 +0000 (08:35 -0400)
commite0b603c89a931790dc54b9d6b14b3ec45a82a888
tree06298e7b6e70cddbe72c9eb7f082630b70690581
parent1af7ccbd920a31126adf5ef92b262aabaaf9d52b
bus: ti-sysc: Fix error handling for sysc_check_active_timer()

[ Upstream commit 06a089ef644934372a3062528244fca3417d3430 ]

We have changed the return type for sysc_check_active_timer() from -EBUSY
to -ENXIO, but the gpt12 system timer fix still checks for -EBUSY. We are
also not returning on other errors like we did earlier as noted by
Pavel Machek <pavel@denx.de>.

Commit 3ff340e24c9d ("bus: ti-sysc: Fix gpt12 system timer issue with
reserved status") should have been updated for commit 65fb73676112
("bus: ti-sysc: suppress err msg for timers used as clockevent/source").

Let's fix the issue by checking for -ENXIO and returning on any other
errors as suggested by Pavel Machek <pavel@denx.de>.

Fixes: 3ff340e24c9d ("bus: ti-sysc: Fix gpt12 system timer issue with reserved status")
Depends-on: 65fb73676112 ("bus: ti-sysc: suppress err msg for timers used as clockevent/source")
Reported-by: Pavel Machek <pavel@denx.de>
Reviewed-by: Pavel Machek (CIP) <pavel@denx.de>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bus/ti-sysc.c