Re: [PATCH 1/1] ar0521: Fix return value check in writing initial registers

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

 



Hi Sakari,

Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> writes:

> The return value from register writes is ignored apart from the last
> value. Fix this.

Must be Emacs' fault :-)

> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>

Acked-by: Krzysztof Hałasa <khalasa@xxxxxxx>

> +++ b/drivers/media/i2c/ar0521.c
> @@ -755,11 +755,12 @@ static int ar0521_power_on(struct device *dev)
>  		gpiod_set_value(sensor->reset_gpio, 0);
>  	usleep_range(4500, 5000); /* min 45000 clocks */
>  
> -	for (cnt = 0; cnt < ARRAY_SIZE(initial_regs); cnt++)
> +	for (cnt = 0; cnt < ARRAY_SIZE(initial_regs); cnt++) {
>  		ret = ar0521_write_regs(sensor, initial_regs[cnt].data,
>  					initial_regs[cnt].count);
>  		if (ret)
>  			goto off;
> +	}

-- 
Krzysztof "Chris" Hałasa

Sieć Badawcza Łukasiewicz
Przemysłowy Instytut Automatyki i Pomiarów PIAP
Al. Jerozolimskie 202, 02-486 Warszawa




[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