提交 21d345a3 编写于 作者: D Dave Stevenson 提交者: Zheng Zengkai

media: i2c: ov5467: Fixup error path to release mutex

raspberrypi inclusion
category: feature
bugzilla: 50432

--------------------------------

"87f3ab9 media: ov5647: Add basic support for multiple sensor modes."
added a return path ov5647_set_fmt that didn't release the device
mutex that it had claimed.
Release the mutex.
Signed-off-by: NDave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: NFang Yafen <yafen@iscas.ac.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 04e48ad2
......@@ -1146,8 +1146,10 @@ static int ov5647_set_fmt(struct v4l2_subdev *sd,
else
mode = mode_8bit;
if (!mode)
if (!mode) {
mutex_unlock(&state->lock);
return -EINVAL;
}
*fmt = mode->format;
if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册