]> git.sur5r.net Git - u-boot/commitdiff
drivers: usb: fsl: Return if USB_MAX_CONTROLLER_COUNT is incorrect
authorNikhil Badola <nikhil.badola@freescale.com>
Sun, 7 Jun 2015 06:58:04 +0000 (12:28 +0530)
committerMarek Vasut <marex@denx.de>
Sun, 7 Jun 2015 13:46:02 +0000 (15:46 +0200)
Return if USB_MAX_CONTROLLER_COUNT hence the index of the controller
to be initialised is incorrect

Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com>
drivers/usb/host/ehci-fsl.c

index 5fd618df87bb876df1cb38d21c73185ef2463ee8..97b7f14542591cf22e4e576ddbc21512f1e49fa9 100644 (file)
@@ -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);