mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 17:48:54 +08:00
Fix the incorrect return value handling in bt_hcicore.c/hc_sr04.c introduced by 6a3c2ade
Report by juniskane Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
ecfdd6e056
commit
fbad85000f
@@ -220,7 +220,7 @@ static int hcsr04_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
|||||||
{
|
{
|
||||||
FAR struct inode *inode = filep->f_inode;
|
FAR struct inode *inode = filep->f_inode;
|
||||||
FAR struct hcsr04_dev_s *priv = inode->i_private;
|
FAR struct hcsr04_dev_s *priv = inode->i_private;
|
||||||
int ret;
|
int ret = OK;
|
||||||
|
|
||||||
/* Get exclusive access */
|
/* Get exclusive access */
|
||||||
|
|
||||||
|
|||||||
@@ -1759,7 +1759,7 @@ int bt_hci_cmd_send_sync(uint16_t opcode, FAR struct bt_buf_s *buf,
|
|||||||
* released while we are waiting.
|
* released while we are waiting.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
nxsem_timedwait_uninterruptible(&sync_sem, &abstime);
|
ret = nxsem_timedwait_uninterruptible(&sync_sem, &abstime);
|
||||||
}
|
}
|
||||||
|
|
||||||
sched_unlock();
|
sched_unlock();
|
||||||
|
|||||||
Reference in New Issue
Block a user