diff --git a/components/drivers/sensors/sensor.c b/components/drivers/sensors/sensor.c index 620d3b1d0a..dba20f6555 100644 --- a/components/drivers/sensors/sensor.c +++ b/components/drivers/sensors/sensor.c @@ -195,6 +195,11 @@ static rt_err_t rt_sensor_open(rt_device_t dev, rt_uint16_t oflag) } else { + if (sensor->module) + { + /* release the module mutex */ + rt_mutex_release(sensor->module->lock); + } return -RT_EINVAL; }