提交 cc74074a 编写于 作者: D Dan Carpenter 提交者: Mauro Carvalho Chehab

media: i2c: ov08d10: Unlock on error in ov08d10_enum_frame_size()

This error path needs to drop the mutex to avoid a deadlock.

Fixes: 7be91e02 ("media: i2c: Add ov08d10 camera sensor driver")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
上级 24e9edc1
......@@ -1264,8 +1264,10 @@ static int ov08d10_enum_frame_size(struct v4l2_subdev *sd,
return -EINVAL;
mutex_lock(&ov08d10->mutex);
if (fse->code != ov08d10_get_format_code(ov08d10))
if (fse->code != ov08d10_get_format_code(ov08d10)) {
mutex_unlock(&ov08d10->mutex);
return -EINVAL;
}
mutex_unlock(&ov08d10->mutex);
fse->min_width = ov08d10->priv_lane->sp_modes[fse->index].width;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册