Consolidate DSDT copy-and-paste PCI IRQ code into method calls.
[seabios.git] / src / usb-uhci.c
index 6e454742e5d81fdb02deb84184441f87cb737d09..f3680d34d11c30d06c2dea76fb32f76b38455b7c 100644 (file)
@@ -185,6 +185,10 @@ uhci_init(struct pci_device *pci, int busid)
         return;
     u16 bdf = pci->bdf;
     struct usb_uhci_s *cntl = malloc_tmphigh(sizeof(*cntl));
+    if (!cntl) {
+        warn_noalloc();
+        return;
+    }
     memset(cntl, 0, sizeof(*cntl));
     cntl->usb.busid = busid;
     cntl->usb.pci = pci;