From 0a695d4c75ff13ab04dc1b6ff91a6f3407d27b63 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Fri, 7 Oct 2016 11:20:01 +0300 Subject: [PATCH] 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 --- drivers/usb/dwc3/gadget.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 71d01b29e7b5..bcd0d32ed4e9 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/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 * 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 */ -- 2.20.1