linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] [media] mx3-camera: locking typo in mx3_videobuf_queue()
@ 2013-08-23  9:45 Dan Carpenter
  2013-08-23 21:16 ` Guennadi Liakhovetski
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2013-08-23  9:45 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: Mauro Carvalho Chehab, linux-media, kernel-janitors

There is a return in the middle where we haven't restored the IRQs to
their original state.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/media/platform/soc_camera/mx3_camera.c b/drivers/media/platform/soc_camera/mx3_camera.c
index 1047e3e..4bae910 100644
--- a/drivers/media/platform/soc_camera/mx3_camera.c
+++ b/drivers/media/platform/soc_camera/mx3_camera.c
@@ -334,7 +334,7 @@ static void mx3_videobuf_queue(struct vb2_buffer *vb)
 	if (!mx3_cam->active)
 		mx3_cam->active = buf;
 
-	spin_unlock_irq(&mx3_cam->lock);
+	spin_unlock_irqrestore(&mx3_cam->lock, flags);
 
 	cookie = txd->tx_submit(txd);
 	dev_dbg(icd->parent, "Submitted cookie %d DMA 0x%08x\n",
@@ -343,7 +343,7 @@ static void mx3_videobuf_queue(struct vb2_buffer *vb)
 	if (cookie >= 0)
 		return;
 
-	spin_lock_irq(&mx3_cam->lock);
+	spin_lock_irqsave(&mx3_cam->lock, flags);
 
 	/* Submit error */
 	list_del_init(&buf->queue);

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-08-29  8:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-23  9:45 [patch] [media] mx3-camera: locking typo in mx3_videobuf_queue() Dan Carpenter
2013-08-23 21:16 ` Guennadi Liakhovetski
2013-08-24  7:06   ` Dan Carpenter
2013-08-28  7:50     ` Guennadi Liakhovetski
2013-08-29  8:23       ` [patch v2] [media] mx3-camera: locking cleanup " Dan Carpenter

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).