From: Felipe Balbi Date: Fri, 7 Oct 2016 08:20:01 +0000 (+0300) Subject: usb: dwc3: gadget: never ever kill the machine X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0a695d4c75ff13ab04dc1b6ff91a6f3407d27b63;p=linux-beck.git 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 --- 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 */