From: Devendra Naga Date: Wed, 20 Feb 2013 02:15:27 +0000 (+1100) Subject: drivers/video/backlight/lm3639_bl.c: remove ret = -EIO at error paths of probe X-Git-Tag: next-20130220~1^2~314 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9c45d241b79668d2cc84fbc6321e5abc3368c198;p=karo-tx-linux.git drivers/video/backlight/lm3639_bl.c: remove ret = -EIO at error paths of probe The APIs are returning correctly the err codes, no need to assign -EIO to the ret again. Signed-off-by: Devendra Naga Acked-by: Daniel Jeong Cc: G.Shark Jeong Acked-by: Jingoo Han Signed-off-by: Andrew Morton --- diff --git a/drivers/video/backlight/lm3639_bl.c b/drivers/video/backlight/lm3639_bl.c index 7ab2d2a04e41..053964da8dd3 100644 --- a/drivers/video/backlight/lm3639_bl.c +++ b/drivers/video/backlight/lm3639_bl.c @@ -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; }