Private
Public Access
2
0

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:
Tapani Utriainen
2017-07-27 15:43:10 +08:00
committed by Brendan Le Foll
parent 0b1ccf526f
commit f71b4be059

View File

@@ -275,7 +275,7 @@ mraa_beaglebone_i2c_init_pre(unsigned int bus)
}
}
return MRAA_SUCCESS;
ret = MRAA_SUCCESS;
} else {
syslog(LOG_ERR, "i2c: Device %s not initialized", devpath);
ret = MRAA_ERROR_INVALID_HANDLE;
@@ -1465,4 +1465,4 @@ error:
syslog(LOG_CRIT, "Beaglebone: failed to initialize");
free(b);
return NULL;
};
};