Private
Public Access
2
0

i2c: clarify our usage of the result of the assignment

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2014-04-27 23:15:54 +01:00
parent ed0a1f6085
commit 1ba2d6040c

View File

@@ -67,7 +67,8 @@ int
maa_i2c_read_byte(i2c_t* dev)
{
int byte;
if (byte = i2c_smbus_read_byte(dev->fh) < 0) {
byte = i2c_smbus_read_byte(dev->fh);
if (byte < 0) {
return -1;
}
return byte;