This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: imx: capture: Handle errors from v4l2_fh_open()
Author:  Laurent Pinchart <[email protected]>
Date:    Mon Feb 15 05:26:34 2021 +0100

If the call to v4l2_fh_open() fails, return the error code instead of
proceeding normally as if nothing happened.

Signed-off-by: Laurent Pinchart <[email protected]>
Reviewed-by: Rui Miguel Silva <[email protected]>
Reviewed-by: Philipp Zabel <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/staging/media/imx/imx-media-capture.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

---

diff --git a/drivers/staging/media/imx/imx-media-capture.c 
b/drivers/staging/media/imx/imx-media-capture.c
index 50bbcb1217e3..101ad562c2eb 100644
--- a/drivers/staging/media/imx/imx-media-capture.c
+++ b/drivers/staging/media/imx/imx-media-capture.c
@@ -643,13 +643,16 @@ static int capture_open(struct file *file)
                return -ERESTARTSYS;
 
        ret = v4l2_fh_open(file);
-       if (ret)
+       if (ret) {
                dev_err(priv->dev, "v4l2_fh_open failed\n");
+               goto out;
+       }
 
        ret = v4l2_pipeline_pm_get(&vfd->entity);
        if (ret)
                v4l2_fh_release(file);
 
+out:
        mutex_unlock(&priv->mutex);
        return ret;
 }

_______________________________________________
linuxtv-commits mailing list
[email protected]
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to