mirror of https://github.com/ARMmbed/mbed-os.git
Add checking for MAX_HUB_NB in a part of code that depend on MAX_HUB_NB
parent
fd06eb2534
commit
4bba4e59fc
|
@ -88,11 +88,14 @@ void USBHost::usb_process()
|
|||
/* check that hub is connected to root port */
|
||||
if (usb_msg->hub_parent) {
|
||||
/* a hub device must be present */
|
||||
#if MAX_HUB_NB
|
||||
|
||||
for (k = 0; k < MAX_HUB_NB; k++) {
|
||||
if ((&hubs[k] == usb_msg->hub_parent) && (hub_in_use[k])) {
|
||||
hub_unplugged=false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
hub_unplugged = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue