You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/11/07 10:14:37 UTC

[incubator-nuttx] 01/02: sensor/mpu60x0: correct mutex usage

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit df55f0137a700cf8fd6df25f25b3de7ec40890b0
Author: chao an <an...@xiaomi.com>
AuthorDate: Mon Nov 7 16:09:51 2022 +0800

    sensor/mpu60x0: correct mutex usage
    
    Signed-off-by: chao an <an...@xiaomi.com>
---
 drivers/sensors/mpu60x0.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/sensors/mpu60x0.c b/drivers/sensors/mpu60x0.c
index 703995b8a7..7705cda54d 100644
--- a/drivers/sensors/mpu60x0.c
+++ b/drivers/sensors/mpu60x0.c
@@ -694,6 +694,7 @@ static int mpu_reset(FAR struct mpu_dev_s *dev)
   ret = __mpu_write_pwr_mgmt_1(dev, PWR_MGMT_1__DEVICE_RESET);
   if (ret != OK)
     {
+      mpu_unlock(dev);
       snerr("Could not find mpu60x0!\n");
       return ret;
     }