summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/drivers/usb/xhci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/payloads/libpayload/drivers/usb/xhci.c b/payloads/libpayload/drivers/usb/xhci.c
index 97c27bcd50..69ddab791a 100644
--- a/payloads/libpayload/drivers/usb/xhci.c
+++ b/payloads/libpayload/drivers/usb/xhci.c
@@ -312,9 +312,11 @@ xhci_pci_init (pcidev_t addr)
}
controller = xhci_init((unsigned long)reg_addr);
- controller->pcidev = addr;
+ if (controller) {
+ controller->pcidev = addr;
- xhci_switch_ppt_ports(addr);
+ xhci_switch_ppt_ports(addr);
+ }
return controller;
}