]> Git Repo - linux.git/commitdiff
bus: ti-sysc: Fix error handling for sysc_check_active_timer()
authorTony Lindgren <[email protected]>
Wed, 11 Aug 2021 05:34:46 +0000 (08:34 +0300)
committerTony Lindgren <[email protected]>
Wed, 11 Aug 2021 05:34:46 +0000 (08:34 +0300)
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 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 <[email protected]>.

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

index 0ef98e3ba3410bc595dae526afd835d088e33d1d..148a4dd8cb9acc76e31537a488bc5e140509e9c1 100644 (file)
@@ -3097,8 +3097,10 @@ static int sysc_probe(struct platform_device *pdev)
                return error;
 
        error = sysc_check_active_timer(ddata);
-       if (error == -EBUSY)
+       if (error == -ENXIO)
                ddata->reserved = true;
+       else if (error)
+               return error;
 
        error = sysc_get_clocks(ddata);
        if (error)
This page took 0.056756 seconds and 4 git commands to generate.