Return early only if there was a timeout, otherwise return the PPS info.

Update #2349.
---
 cpukit/score/src/kern_tc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c
index c09900f096..2e3709a9ad 100644
--- a/cpukit/score/src/kern_tc.c
+++ b/cpukit/score/src/kern_tc.c
@@ -1980,7 +1980,8 @@ pps_fetch(struct pps_fetch_args *fapi, struct pps_state 
*pps)
 #else /* __rtems__ */
                        _Assert(pps->wait != NULL);
                        err = (*pps->wait)(pps, fapi->timeout);
-                       return (err);
+                       if (err != 0)
+                               return (err);
 #endif /* __rtems__ */
                }
        }
-- 
2.35.3

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to