未验证 提交 c8f0ae3f 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #2755 from Guozhanxin/sensor_fix

[sensor] Fixed error with mutex_lock take and release not matching.
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册