linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] [media] davinci: vpif: missing unlocks on error
@ 2014-06-11  7:31 Dan Carpenter
  2014-06-11  9:44 ` Prabhakar Lad
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2014-06-11  7:31 UTC (permalink / raw)
  To: Lad, Prabhakar
  Cc: Mauro Carvalho Chehab, linux-media, davinci-linux-open-source,
	kernel-janitors

We recently changed some locking around so we need some new unlocks on
the error paths.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Please review this one carefully.  I don't know if the unlock should go
before or after the list_for_each_entry_safe() loop.

diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
index a7ed164..2c08fbd 100644
--- a/drivers/media/platform/davinci/vpif_capture.c
+++ b/drivers/media/platform/davinci/vpif_capture.c
@@ -265,6 +265,8 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)
 	return 0;
 
 err:
+	spin_unlock_irqrestore(&common->irqlock, flags);
+
 	list_for_each_entry_safe(buf, tmp, &common->dma_queue, list) {
 		list_del(&buf->list);
 		vb2_buffer_done(&buf->vb, VB2_BUF_STATE_QUEUED);
diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c
index 5bb085b..b7b2bdf 100644
--- a/drivers/media/platform/davinci/vpif_display.c
+++ b/drivers/media/platform/davinci/vpif_display.c
@@ -229,6 +229,8 @@ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count)
 	return 0;
 
 err:
+	spin_unlock_irqrestore(&common->irqlock, flags);
+
 	list_for_each_entry_safe(buf, tmp, &common->dma_queue, list) {
 		list_del(&buf->list);
 		vb2_buffer_done(&buf->vb, VB2_BUF_STATE_QUEUED);

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

end of thread, other threads:[~2014-06-16 11:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-11  7:31 [patch] [media] davinci: vpif: missing unlocks on error Dan Carpenter
2014-06-11  9:44 ` Prabhakar Lad
2014-06-12  7:01   ` [patch v2] " Dan Carpenter
2014-06-13 18:13     ` Prabhakar Lad
2014-06-16  9:48       ` Hans Verkuil
2014-06-16 11:07         ` Prabhakar Lad

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