|
@@ -122,6 +122,9 @@ void *hcd_buffer_alloc(
|
|
struct usb_hcd *hcd = bus_to_hcd(bus);
|
|
struct usb_hcd *hcd = bus_to_hcd(bus);
|
|
int i;
|
|
int i;
|
|
|
|
|
|
|
|
+ if (size == 0)
|
|
|
|
+ return NULL;
|
|
|
|
+
|
|
/* some USB hosts just use PIO */
|
|
/* some USB hosts just use PIO */
|
|
if (!IS_ENABLED(CONFIG_HAS_DMA) ||
|
|
if (!IS_ENABLED(CONFIG_HAS_DMA) ||
|
|
(!bus->controller->dma_mask &&
|
|
(!bus->controller->dma_mask &&
|