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 <nikhil.badola@freescale.com>
This commit is contained in:
Nikhil Badola 2015-06-07 12:28:04 +05:30 committed by Marek Vasut
parent 5bcec545a6
commit 19b17d1254

View 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);