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)
committerTony Lindgren <tony@atomide.com>
Wed, 11 Aug 2021 05:34:46 +0000 (08:34 +0300)
commit06a089ef644934372a3062528244fca3417d3430
tree4fc0963b0c34309b9238d63e02e4eb1cd4f28adf
parent353b7a55dcaf5fb8758e09ebe2ddf5f3adbac7c5
bus: ti-sysc: Fix error handling for sysc_check_active_timer()

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>
drivers/bus/ti-sysc.c