Commit ebd96f89 authored by Bastien Nocera's avatar Bastien Nocera

lib: Make fpi_timeout_add() never fail

It will now assert if the monotonic clock isn't available. If that's the
case, we'll have bigger problems anyway.
parent 4b9b34fa
......@@ -146,7 +146,9 @@ fpi_timeout_set_name(fpi_timeout *timeout,
* Note that you should hold onto the return value of this function to cancel it
* use fpi_timeout_cancel(), otherwise the callback could be called while the driver
* is being torn down. %NULL is returned on failure.
* is being torn down.
* This function can be considered to never fail.
* Returns: an #fpi_timeout structure
......@@ -167,6 +169,7 @@ fpi_timeout *fpi_timeout_add(unsigned int msec,
r = clock_gettime(CLOCK_MONOTONIC, &ts);
if (r < 0) {
fp_err("failed to read monotonic clock, errno=%d", errno);
return NULL;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment