You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/01/09 18:30:30 UTC
[incubator-nuttx] branch pr67 updated: Fix the incorrect return
value handling in bt_hcicore.c/hc_sr04.c introduced by 6a3c2ade
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch pr67
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/pr67 by this push:
new fbad850 Fix the incorrect return value handling in bt_hcicore.c/hc_sr04.c introduced by 6a3c2ade
fbad850 is described below
commit fbad85000faeb38f4620af53487373e83ebef640
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri Jan 10 01:59:20 2020 +0800
Fix the incorrect return value handling in bt_hcicore.c/hc_sr04.c introduced by 6a3c2ade
Report by juniskane
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
drivers/sensors/hc_sr04.c | 2 +-
wireless/bluetooth/bt_hcicore.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/sensors/hc_sr04.c b/drivers/sensors/hc_sr04.c
index e07fea6..3ee8766 100644
--- a/drivers/sensors/hc_sr04.c
+++ b/drivers/sensors/hc_sr04.c
@@ -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 */
diff --git a/wireless/bluetooth/bt_hcicore.c b/wireless/bluetooth/bt_hcicore.c
index 6e29366..98301ee 100644
--- a/wireless/bluetooth/bt_hcicore.c
+++ b/wireless/bluetooth/bt_hcicore.c
@@ -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();