This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/media_tree.git tree:

Subject: [media] v4l: atmel-isi: Simplify error handling during DT parsing
Author:  Laurent Pinchart <[email protected]>
Date:    Sat Aug 1 06:22:53 2015 -0300

Put the endpoint DT node earlier to avoid the need for goto statements
to a cleanup code block in case of errors.

Signed-off-by: Laurent Pinchart <[email protected]>
Tested-by: Josh Wu <[email protected]>
Signed-off-by: Guennadi Liakhovetski <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/platform/soc_camera/atmel-isi.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?id=375123976f71367c2e14921179149f52b2225746

diff --git a/drivers/media/platform/soc_camera/atmel-isi.c 
b/drivers/media/platform/soc_camera/atmel-isi.c
index a3ddec7..0f23984 100644
--- a/drivers/media/platform/soc_camera/atmel-isi.c
+++ b/drivers/media/platform/soc_camera/atmel-isi.c
@@ -899,9 +899,10 @@ static int atmel_isi_probe_dt(struct atmel_isi *isi,
        }
 
        err = v4l2_of_parse_endpoint(np, &ep);
+       of_node_put(np);
        if (err) {
                dev_err(&pdev->dev, "Could not parse the endpoint\n");
-               goto err_probe_dt;
+               return err;
        }
 
        switch (ep.bus.parallel.bus_width) {
@@ -915,14 +916,10 @@ static int atmel_isi_probe_dt(struct atmel_isi *isi,
        default:
                dev_err(&pdev->dev, "Unsupported bus width: %d\n",
                                ep.bus.parallel.bus_width);
-               err = -EINVAL;
-               goto err_probe_dt;
+               return -EINVAL;
        }
 
-err_probe_dt:
-       of_node_put(np);
-
-       return err;
+       return 0;
 }
 
 static int atmel_isi_probe(struct platform_device *pdev)

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

Reply via email to