[PATCH 1/?] &&/|| confusion

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

 



On Sat, 17 Jan 2009 15:02:26 +0100, Roel Kluin wrote:
> I wrote:
> > diff --git a/drivers/hwmon/ltc4245.c b/drivers/hwmon/ltc4245.c
> > index 034b2c5..4a1c9fb 100644
> > --- a/drivers/hwmon/ltc4245.c
> > +++ b/drivers/hwmon/ltc4245.c
> > @@ -456,7 +456,7 @@ static int ltc4245_check_control_reg(struct i2c_client *client, u8 reg, u8 bits)
> >  		voff1 &= bits;
> >  		voff2 &= bits;
> >  
> > -		if (v != voff1 || v != voff2)
> > +		if (v != voff1 && v != voff2)
> >  			return -ENODEV;
> >  	}
> 
> 
> On second hand I am not so certain this is wrong. If so, sorry for the noise.

The original code looks OK to me.

-- 
Jean Delvare




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux