From: Nikhil Badola Date: Sun, 7 Jun 2015 06:58:04 +0000 (+0530) Subject: drivers: usb: fsl: Return if USB_MAX_CONTROLLER_COUNT is incorrect X-Git-Tag: v2015.07-rc3~50^2~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=19b17d12549fbd670e516e40757265e406153da3;p=u-boot drivers: usb: fsl: Return if USB_MAX_CONTROLLER_COUNT is incorrect Return if USB_MAX_CONTROLLER_COUNT hence the index of the controller to be initialised is incorrect Signed-off-by: Nikhil Badola --- diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 5fd618df87..97b7f14542 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -76,7 +76,7 @@ int ehci_hcd_init(int index, enum usb_init_type init, break; default: printf("ERROR: wrong controller index!!\n"); - break; + return -EINVAL; }; *hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength);