[SLOF] [PATCH v2 4/8] usb-xhci: return on allocation failure

Nikunj A Dadhania nikunj at linux.vnet.ibm.com
Fri Sep 18 18:46:58 AEST 2015


Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
---
 lib/libusb/usb-xhci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/libusb/usb-xhci.c b/lib/libusb/usb-xhci.c
index c4ee387..73d3e52 100644
--- a/lib/libusb/usb-xhci.c
+++ b/lib/libusb/usb-xhci.c
@@ -1228,7 +1228,8 @@ static void xhci_init_bulk_ep(struct usb_dev *dev, struct usb_pipe *pipe)
 
 	if (!seg->trbs) {
 		if (!xhci_alloc_seg(seg, XHCI_DATA_TRBS_SIZE, TYPE_BULK)) {
-			dprintf("Failed allocating seg\n");
+			printf("usb-xhci: allocation failed for bulk endpoint\n");
+			return;
 		}
 	} else {
 		xhci_init_seg(seg, XHCI_DATA_TRBS_SIZE, TYPE_BULK);
-- 
2.4.3



More information about the SLOF mailing list