Skip to contentSkip to conversation

Staging: media: davinci_vpfe: unlock on error in vpfe_reqbufs()

PATCH In review Dan Carpenter 2 participants 2 messages Nov 18, 2016 – Nov 22, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: media: davinci_vpfe: unlock on error in vpfe_reqbufs()

We should unlock before returning this error code in vpfe_reqbufs().

Fixes 622897da67b3 ("[media] davinci: vpfe: add v4l2 video driver support")
drivers/staging/media/davinci_vpfe/vpfe_video.c +1 -1
index c34bf46..353f3a8 100644
@@ -1362,7 +1362,7 @@ static int vpfe_reqbufs(struct file *file, void *priv,
 	ret = vb2_queue_init(q);
 	if (ret) {
 		v4l2_err(&vpfe_dev->v4l2_dev, "vb2_queue_init() failed\n");
-		return ret;
+		goto unlock_out;
 	}
 
 	fh->io_allowed = 1;
Acked-by on v1 1/1
#1 lore raw

Hi Dan,

Thank you for the patch.

Quoted 4 lines · On Friday 18 Nov 2016 14:30:24 Dan Carpenter wrote:

We should unlock before returning this error code in vpfe_reqbufs().

Fixes 622897da67b3 ("[media] davinci: vpfe: add v4l2 video driver support")

and applied to my tree. I will send a pull request for v4.11.

Quoted 14 lines
(quoted diff) +0 -0

b/drivers/staging/media/davinci_vpfe/vpfe_video.c index c34bf46..353f3a8 100644

drivers/staging/media/davinci_vpfe/vpfe_video.c +1 -1
@@ -1362,7 +1362,7 @@ static int vpfe_reqbufs(struct file *file, void *priv,
 ret = vb2_queue_init(q);
 	if (ret) {
 		v4l2_err(&vpfe_dev->v4l2_dev, "vb2_queue_init() failed\n");
-		return ret;
+		goto unlock_out;
 	}
 
 	fh->io_allowed = 1;
Signature · 3 lines
Regards,

Laurent Pinchart