xhci: Check if scratch pad allocation fails.

Some boards ask for a large amount of ram for scratch pad usage, and
it is possible the allocation will fail.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
diff --git a/src/hw/usb-xhci.c b/src/hw/usb-xhci.c
index dc54182..65d1be0 100644
--- a/src/hw/usb-xhci.c
+++ b/src/hw/usb-xhci.c
@@ -687,6 +687,12 @@
         dprintf(3, "%s: setup %d scratch pad buffers\n", __func__, spb);
         u64 *spba = memalign_high(64, sizeof(*spba) * spb);
         void *pad = memalign_high(PAGE_SIZE, PAGE_SIZE * spb);
+        if (!spba || !pad) {
+            warn_noalloc();
+            free(spba);
+            free(pad);
+            goto fail;
+        }
         int i;
         for (i = 0; i < spb; i++)
             spba[i] = (u32)pad + (i * PAGE_SIZE);