[PATCH] score: Fix pps_fetch()
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon May 23 07:19:27 UTC 2022
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
More information about the devel
mailing list