Re: [PATCH 2/2] i2c: exynos5: remove pointless initializers

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

 



On 09.05.2018 21:45, Peter Rosin wrote:
> The variables are always assigned before use anyway.
>
> Signed-off-by: Peter Rosin <peda@xxxxxxxxxx>
> ---
>  drivers/i2c/busses/i2c-exynos5.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
> index a2cbc779c33a..185fba37e830 100644
> --- a/drivers/i2c/busses/i2c-exynos5.c
> +++ b/drivers/i2c/busses/i2c-exynos5.c
> @@ -707,7 +707,7 @@ static int exynos5_i2c_xfer(struct i2c_adapter *adap,
>  			struct i2c_msg *msgs, int num)
>  {
>  	struct exynos5_i2c *i2c = adap->algo_data;
> -	int i = 0, ret = 0, stop = 0;
> +	int i, ret, stop;

I hope gcc is smart enough to not complain in case of ret.
I think you can merge both patches into one.

Regards
Andrzej

>  
>  	if (i2c->suspended) {
>  		dev_err(i2c->dev, "HS-I2C is not initialized.\n");





[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux