]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/video/backlight/lm3639_bl.c: remove ret = -EIO at error paths of probe
authorDevendra Naga <devendra.aaru@gmail.com>
Wed, 20 Feb 2013 02:15:27 +0000 (13:15 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:53:15 +0000 (16:53 +1100)
The APIs are returning correctly the err codes, no need to assign -EIO
to the ret again.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Acked-by: Daniel Jeong <daniel.jeong@ti.com>
Cc: G.Shark Jeong <gshark.jeong@gmail.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/video/backlight/lm3639_bl.c

index 7ab2d2a04e41a8aca4dc6e9e14a104fbebbe3cd3..053964da8dd3015e2a96ff2d7d9b5083dc6c4653 100644 (file)
@@ -350,14 +350,13 @@ static int lm3639_probe(struct i2c_client *client,
                                      &lm3639_bled_ops, &props);
        if (IS_ERR(pchip->bled)) {
                dev_err(&client->dev, "fail : backlight register\n");
-               ret = -EIO;
+               ret = PTR_ERR(pchip->bled);
                goto err_out;
        }
 
        ret = device_create_file(&(pchip->bled->dev), &dev_attr_bled_mode);
        if (ret < 0) {
                dev_err(&client->dev, "failed : add sysfs entries\n");
-               ret = -EIO;
                goto err_bled_mode;
        }
 
@@ -369,7 +368,6 @@ static int lm3639_probe(struct i2c_client *client,
                                    &client->dev, &pchip->cdev_flash);
        if (ret < 0) {
                dev_err(&client->dev, "fail : flash register\n");
-               ret = -EIO;
                goto err_flash;
        }
 
@@ -381,7 +379,6 @@ static int lm3639_probe(struct i2c_client *client,
                                    &client->dev, &pchip->cdev_torch);
        if (ret < 0) {
                dev_err(&client->dev, "fail : torch register\n");
-               ret = -EIO;
                goto err_torch;
        }