Fix the incorrect return value handling in bt_hcicore.c/hc_sr04.c
Report by juniskane Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
commit
51eaed8765
@ -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 hcsr04_dev_s *priv = inode->i_private;
|
||||
int ret;
|
||||
int ret = OK;
|
||||
|
||||
/* 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.
|
||||
*/
|
||||
|
||||
nxsem_timedwait_uninterruptible(&sync_sem, &abstime);
|
||||
ret = nxsem_timedwait_uninterruptible(&sync_sem, &abstime);
|
||||
}
|
||||
|
||||
sched_unlock();
|
||||
|
Loading…
Reference in New Issue
Block a user