Private
Public Access
2
0

mraa.c: usb MRAA_UNKNOWN_PLATFORM is not considered initialisation

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2015-08-11 11:54:11 +01:00
parent 4757d039ab
commit 570fba9463

View File

@@ -131,8 +131,10 @@ mraa_init()
// Now detect sub platform
if (plat != NULL) {
mraa_platform_t usb_platform_type = mraa_usb_platform_extender(plat);
if (plat->platform_type == MRAA_UNKNOWN_PLATFORM) {
if (plat->platform_type == MRAA_UNKNOWN_PLATFORM && usb_platform_type != MRAA_UNKNOWN_PLATFORM) {
plat->platform_type = usb_platform_type;
} else {
return MRAA_ERROR_PLATFORM_NOT_INITIALISED;
}
}
if (plat == NULL) {