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

Subject: [media] smiapp: Return correct return value in smiapp_registered()
Author:  Sakari Ailus <[email protected]>
Date:    Sat May 3 21:31:57 2014 -0300

Prepare for supporting systems using the Device tree. Should the resources
not be available at the time of driver probe(), the EPROBE_DEFER error code
must be also returned from its probe function.

Signed-off-by: Sakari Ailus <[email protected]>
Acked-by: Laurent Pinchart <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/i2c/smiapp/smiapp-core.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

---

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=24644035d52a9da2af319dd05b1a580a0a7069a0

diff --git a/drivers/media/i2c/smiapp/smiapp-core.c 
b/drivers/media/i2c/smiapp/smiapp-core.c
index 8d01711..06fb032 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -2358,14 +2358,14 @@ static int smiapp_registered(struct v4l2_subdev *subdev)
        sensor->vana = devm_regulator_get(&client->dev, "vana");
        if (IS_ERR(sensor->vana)) {
                dev_err(&client->dev, "could not get regulator for vana\n");
-               return -ENODEV;
+               return PTR_ERR(sensor->vana);
        }
 
        if (!sensor->platform_data->set_xclk) {
                sensor->ext_clk = devm_clk_get(&client->dev, "ext_clk");
                if (IS_ERR(sensor->ext_clk)) {
                        dev_err(&client->dev, "could not get clock\n");
-                       return -ENODEV;
+                       return PTR_ERR(sensor->ext_clk);
                }
 
                rval = clk_set_rate(sensor->ext_clk,
@@ -2374,18 +2374,19 @@ static int smiapp_registered(struct v4l2_subdev *subdev)
                        dev_err(&client->dev,
                                "unable to set clock freq to %u\n",
                                sensor->platform_data->ext_clk);
-                       return -ENODEV;
+                       return rval;
                }
        }
 
        if (gpio_is_valid(sensor->platform_data->xshutdown)) {
-               if (devm_gpio_request_one(&client->dev,
-                                         sensor->platform_data->xshutdown, 0,
-                                         "SMIA++ xshutdown") != 0) {
+               rval = devm_gpio_request_one(
+                       &client->dev, sensor->platform_data->xshutdown, 0,
+                       "SMIA++ xshutdown");
+               if (rval < 0) {
                        dev_err(&client->dev,
                                "unable to acquire reset gpio %d\n",
                                sensor->platform_data->xshutdown);
-                       return -ENODEV;
+                       return rval;
                }
        }
 

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

Reply via email to