Browse Source

usb: dwc3: gadget: never ever kill the machine

We should never kill the machine just because some
USB endpoint type is wrong. WARN about it and move
on.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Felipe Balbi 8 years ago
parent
commit
0a695d4c75
1 changed files with 2 additions and 1 deletions
  1. 2 1
      drivers/usb/dwc3/gadget.c

+ 2 - 1
drivers/usb/dwc3/gadget.c

@@ -871,7 +871,8 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep,
 		 * This is only possible with faulty memory because we
 		 * This is only possible with faulty memory because we
 		 * checked it already :)
 		 * checked it already :)
 		 */
 		 */
-		BUG();
+		dev_WARN(dwc->dev, "Unknown endpoint type %d\n",
+				usb_endpoint_type(dep->endpoint.desc));
 	}
 	}
 
 
 	/* always enable Continue on Short Packet */
 	/* always enable Continue on Short Packet */