diff --git a/drivers/sensors/hc_sr04.c b/drivers/sensors/hc_sr04.c index e07fea6bdb..3ee8766952 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 6e29366a87..98301ee1c1 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();