Commit 17f74b14 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab

media: smiapp: unlock on error in smiapp_start_streaming()

We added two new error paths to smiapp_start_streaming(), but we can't
return directly without dropping the "sensor->mutex" lock.

Fixes: f8c4352c ("media: smiapp: Move binning configuration to streaming start")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent dca5ef2a
...@@ -1362,13 +1362,13 @@ static int smiapp_start_streaming(struct smiapp_sensor *sensor) ...@@ -1362,13 +1362,13 @@ static int smiapp_start_streaming(struct smiapp_sensor *sensor)
rval = smiapp_write( rval = smiapp_write(
sensor, SMIAPP_REG_U8_BINNING_TYPE, binning_type); sensor, SMIAPP_REG_U8_BINNING_TYPE, binning_type);
if (rval < 0) if (rval < 0)
return rval; goto out;
binning_mode = 1; binning_mode = 1;
} }
rval = smiapp_write(sensor, SMIAPP_REG_U8_BINNING_MODE, binning_mode); rval = smiapp_write(sensor, SMIAPP_REG_U8_BINNING_MODE, binning_mode);
if (rval < 0) if (rval < 0)
return rval; goto out;
/* Set up PLL */ /* Set up PLL */
rval = smiapp_pll_configure(sensor); rval = smiapp_pll_configure(sensor);
......
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