Another oops. I introduced a but in a previous commit. The CAN read method nees to return an error if sem_wait() fails for any reason
This commit is contained in:
parent
621fef2c31
commit
048d338808
@ -330,9 +330,8 @@ static ssize_t can_read(FAR struct file *filep, FAR char *buffer,
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
ret = sem_wait(&dev->cd_recv.rx_sem);
|
ret = sem_wait(&dev->cd_recv.rx_sem);
|
||||||
DEBUGASSERT(ret >= 0 || errno == EINTR);
|
|
||||||
}
|
}
|
||||||
while (dev->cd_recv.rx_head == dev->cd_recv.rx_tail);
|
while (ret >= 0 && dev->cd_recv.rx_head == dev->cd_recv.rx_tail);
|
||||||
dev->cd_nrxwaiters--;
|
dev->cd_nrxwaiters--;
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user