diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c index e7c7e3ab4b383b606b09d7887e0e3a1bb9132466..09d68b0b4a13e6846009073ac50ca5ff93a6cc52 100644 --- a/drivers/media/i2c/ov5647.c +++ b/drivers/media/i2c/ov5647.c @@ -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) {