Re: [PATCH] backlight: lm3649_backlight: remove ret = -EIO at error paths of probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday, January 01, 2013 3:19 AM, Devendra Naga wrote
> the APIs are returning correctly the err codes, no need of assigning -EIO to the
> ret again
> 
> Cc: Daniel Jeong <daniel.jeong@xxxxxx>
> Cc: G.Shark Jeong <gshark.jeong@xxxxxxxxx>
> Signed-off-by: Devendra Naga <devendra.aaru@xxxxxxxxx>

It looks good.
Acked-by: Jingoo Han <jg1.han@xxxxxxxxxxx>


Best regards,
Jingoo Han

> ---
>  drivers/video/backlight/lm3639_bl.c |    5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/video/backlight/lm3639_bl.c b/drivers/video/backlight/lm3639_bl.c
> index 7ab2d2a..053964d 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;
>  	}
> 
> --
> 1.7.10.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
ÿ淸º{.nÇ+돴윯돪†+%듚ÿ깁負¥Šwÿº{.nÇ+돴¥Š{깰鍼zÿâ왲^n‡r⊆¦zË곷h솳鈺Ú&{àz요z받쀺+€Ê+zf"·hš닱~넮녬iÿÿï곴ÿ묎çz_溫æj:+v돣þ)山øm



[Index of Archives]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Tourism]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux