* [PATCH] media: smiapp: unlock on error in smiapp_start_streaming()
@ 2019-10-29 18:24 Dan Carpenter
2019-10-30 8:24 ` Sakari Ailus
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2019-10-29 18:24 UTC (permalink / raw)
To: Sakari Ailus
Cc: Mauro Carvalho Chehab, linux-media, linux-kernel, kernel-janitors
We added two new error paths to smiapp_start_streaming(), but we can't
return directly without dropping the "sensor->mutex" lock.
Fixes: f8c4352c1bef ("media: smiapp: Move binning configuration to streaming start")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/media/i2c/smiapp/smiapp-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index 77dfce7c3be9..84f9771b5fed 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -1362,13 +1362,13 @@ static int smiapp_start_streaming(struct smiapp_sensor *sensor)
rval = smiapp_write(
sensor, SMIAPP_REG_U8_BINNING_TYPE, binning_type);
if (rval < 0)
- return rval;
+ goto out;
binning_mode = 1;
}
rval = smiapp_write(sensor, SMIAPP_REG_U8_BINNING_MODE, binning_mode);
if (rval < 0)
- return rval;
+ goto out;
/* Set up PLL */
rval = smiapp_pll_configure(sensor);
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: smiapp: unlock on error in smiapp_start_streaming()
2019-10-29 18:24 [PATCH] media: smiapp: unlock on error in smiapp_start_streaming() Dan Carpenter
@ 2019-10-30 8:24 ` Sakari Ailus
0 siblings, 0 replies; 2+ messages in thread
From: Sakari Ailus @ 2019-10-30 8:24 UTC (permalink / raw)
To: Dan Carpenter
Cc: Mauro Carvalho Chehab, linux-media, linux-kernel, kernel-janitors
On Tue, Oct 29, 2019 at 09:24:01PM +0300, Dan Carpenter wrote:
> We added two new error paths to smiapp_start_streaming(), but we can't
> return directly without dropping the "sensor->mutex" lock.
>
> Fixes: f8c4352c1bef ("media: smiapp: Move binning configuration to streaming start")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks, Dan!
--
Sakari Ailus
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-30 8:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-29 18:24 [PATCH] media: smiapp: unlock on error in smiapp_start_streaming() Dan Carpenter
2019-10-30 8:24 ` Sakari Ailus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).