SAMD/L21: Need to preserve errno value across syslog() call.
This commit is contained in:
parent
0d08ce500e
commit
447785b264
@ -625,8 +625,9 @@ static int i2c_wait_for_bus(struct sam_i2c_dev_s *priv, unsigned int size)
|
||||
|
||||
if (sem_timedwait(&priv->waitsem, (const struct timespec *)&ts) != OK)
|
||||
{
|
||||
i2cinfo("timedwait error %d\n", errno);
|
||||
return -errno;
|
||||
int errcode = errno;
|
||||
i2cinfo("timedwait error %d\n", errcode);
|
||||
return -errcode;
|
||||
}
|
||||
|
||||
return priv->result;
|
||||
|
Loading…
Reference in New Issue
Block a user