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

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
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -454,9 +454,11 @@ 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 */
	if ((dev->sensor_id == IMX175_ID) && dev->digital_gain)