[media] staging: media: davinci_vpfe: unlock on error in vpfe_reqbufs()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 18 Nov 2016 11:30:24 +0000 (09:30 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 23 Nov 2016 15:59:21 +0000 (13:59 -0200)
We should unlock before returning this error code in vpfe_reqbufs().

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

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/davinci_vpfe/vpfe_video.c

index 8fd3f7cd40d6481bbb4a9260b493d21d910db8f1..c27d7e9a1bdbe84059b484c7971f0f6ff9a16c33 100644 (file)
@@ -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;