summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
Diffstat (limited to 'payloads')
-rw-r--r--payloads/libpayload/drivers/usb/usb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/usb/usb.c b/payloads/libpayload/drivers/usb/usb.c
index bfb697d619..bb42f89826 100644
--- a/payloads/libpayload/drivers/usb/usb.c
+++ b/payloads/libpayload/drivers/usb/usb.c
@@ -336,6 +336,8 @@ generic_set_address (hci_t *controller, usb_speed speed,
int hubport, int hubaddr)
{
int adr = get_free_address (controller); // address to set
+ if (adr < 0)
+ return NULL;
dev_req_t dr;
memset (&dr, 0, sizeof (dr));