Commit 9bc30b3a authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman

atomisp/imx: Fix locking bug on error path

This was reported by Dan Carpenter. When we error with an IMX 227 we don't release
the lock and the sensor would then hang.
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b8340109
......@@ -454,8 +454,10 @@ static int imx_set_exposure_gain(struct v4l2_subdev *sd, u16 coarse_itg,
if (dev->sensor_id == IMX227_ID) {
ret = imx_write_reg_array(client, imx_param_hold);
if (ret)
if (ret) {
mutex_unlock(&dev->input_lock);
return ret;
}
}
/* For imx175, setting gain must be delayed by one */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment