|
@@ -2631,7 +2631,10 @@ static int dwc2_hsotg_ep_enable(struct usb_ep *ep,
|
|
|
desc->wMaxPacketSize, desc->bInterval);
|
|
|
|
|
|
/* not to be called for EP0 */
|
|
|
- WARN_ON(index == 0);
|
|
|
+ if (index == 0) {
|
|
|
+ dev_err(hsotg->dev, "%s: called for EP 0\n", __func__);
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
|
|
|
dir_in = (desc->bEndpointAddress & USB_ENDPOINT_DIR_MASK) ? 1 : 0;
|
|
|
if (dir_in != hs_ep->dir_in) {
|