mirror of
https://github.com/apache/nuttx.git
synced 2026-03-27 02:29:15 +08:00
Call nxsem_destroy or nxmutex_destry in the error path
1.Don't check the return value of nxsem_init or nxmutex_init 2.Fix some style issue Signed-off-by: anjiahao <anjiahao@xiaomi.com> Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
99cfffc96a
commit
d7b4e91dda
@@ -435,7 +435,7 @@ static ssize_t cc1101_file_write(FAR struct file *filep,
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = cc1101_write(dev, (const uint8_t *)buffer, buflen);
|
||||
ret = cc1101_write(dev, (FAR const uint8_t *)buffer, buflen);
|
||||
cc1101_send(dev);
|
||||
nxmutex_unlock(&dev->devlock);
|
||||
return ret;
|
||||
@@ -560,7 +560,7 @@ static ssize_t cc1101_file_read(FAR struct file *filep, FAR char *buffer,
|
||||
return ret;
|
||||
}
|
||||
|
||||
buflen = fifo_get(dev, (uint8_t *)buffer, buflen);
|
||||
buflen = fifo_get(dev, (FAR uint8_t *)buffer, buflen);
|
||||
nxmutex_unlock(&dev->devlock);
|
||||
return buflen;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user