Skip to content

Commit 06a089e

Browse files
committed
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 <[email protected]>. Commit 3ff340e ("bus: ti-sysc: Fix gpt12 system timer issue with reserved status") should have been updated for commit 65fb736 ("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 <[email protected]>. Fixes: 3ff340e ("bus: ti-sysc: Fix gpt12 system timer issue with reserved status") Depends-on: 65fb736 ("bus: ti-sysc: suppress err msg for timers used as clockevent/source") Reported-by: Pavel Machek <[email protected]> Reviewed-by: Pavel Machek (CIP) <[email protected]> Cc: Grygorii Strashko <[email protected]> Cc: Jarkko Nikula <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent 353b7a5 commit 06a089e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/bus/ti-sysc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3097,8 +3097,10 @@ static int sysc_probe(struct platform_device *pdev)
30973097
return error;
30983098

30993099
error = sysc_check_active_timer(ddata);
3100-
if (error == -EBUSY)
3100+
if (error == -ENXIO)
31013101
ddata->reserved = true;
3102+
else if (error)
3103+
return error;
31023104

31033105
error = sysc_get_clocks(ddata);
31043106
if (error)

0 commit comments

Comments
 (0)