Re: [PATCH 06/14] i2c/ov8865.c: fix error checks using wrong variable

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

 



Hi Hans,

On Wed, Jan 20, 2021 at 10:42:58AM +0100, Hans Verkuil wrote:
> Fix two typos: dvdd -> dovdd and dvdd -> avdd
> 
> Both clearly copy-and-paste mistakes.
> 
> Fixes this smatch warning:
> 
> drivers/media/i2c/ov8865.c:2852 ov8865_probe() warn: passing zero to 'PTR_ERR'
> 
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> ---
>  drivers/media/i2c/ov8865.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/i2c/ov8865.c b/drivers/media/i2c/ov8865.c
> index fda5a55979aa..72ef300c0b67 100644
> --- a/drivers/media/i2c/ov8865.c
> +++ b/drivers/media/i2c/ov8865.c
> @@ -2839,9 +2839,9 @@ static int ov8865_probe(struct i2c_client *client)
>  
>  	/* DOVDD: digital I/O */
>  	sensor->dovdd = devm_regulator_get(dev, "dovdd");
> -	if (IS_ERR(sensor->dvdd)) {
> +	if (IS_ERR(sensor->dovdd)) {
>  		dev_err(dev, "cannot get DOVDD (digital I/O) regulator\n");
> -		ret = PTR_ERR(sensor->dvdd);
> +		ret = PTR_ERR(sensor->dovdd);
>  		goto error_endpoint;
>  	}
>  
> @@ -2849,7 +2849,7 @@ static int ov8865_probe(struct i2c_client *client)
>  	sensor->avdd = devm_regulator_get(dev, "avdd");
>  	if (IS_ERR(sensor->avdd)) {
>  		dev_err(dev, "cannot get AVDD (analog) regulator\n");
> -		ret = PTR_ERR(sensor->dvdd);
> +		ret = PTR_ERR(sensor->avdd);

This change is already in Julia's patch on which I've sent a pull request.

Could you omit it, leaving only the dovdd check to avoid a conflict?

>  		goto error_endpoint;
>  	}
>  

-- 
Regards,

Sakari Ailus



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux