beaglebone.c: use the ret variable in i2c_init_pre also when successful
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
committed by
Brendan Le Foll
parent
0b1ccf526f
commit
f71b4be059
@@ -275,7 +275,7 @@ mraa_beaglebone_i2c_init_pre(unsigned int bus)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return MRAA_SUCCESS;
|
ret = MRAA_SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
syslog(LOG_ERR, "i2c: Device %s not initialized", devpath);
|
syslog(LOG_ERR, "i2c: Device %s not initialized", devpath);
|
||||||
ret = MRAA_ERROR_INVALID_HANDLE;
|
ret = MRAA_ERROR_INVALID_HANDLE;
|
||||||
|
|||||||
Reference in New Issue
Block a user