From: Felipe Balbi Date: Fri, 13 May 2016 07:19:42 +0000 (+0300) Subject: usb: dwc3: gadget: return 0 if we try to Wakeup in superspeed X-Git-Tag: v4.8-rc1~191^2~23^2~98 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6b74289937f624439c87135cfabb3deb2955fb53;p=thirdparty%2Fkernel%2Flinux.git usb: dwc3: gadget: return 0 if we try to Wakeup in superspeed Instead of returning -EINVAL when someone calls __dwc3_gadget_wakeup() in speeds > highspeed, let's return 0. There are no problems for the driver for calling it in superspeed as we cleanly just return. This avoids an annoying WARN_ONCE() always triggering during superspeed enumeration with LPM enabled. Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 79d1882f1908e..4c9fe7b551009 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1431,7 +1431,7 @@ static int __dwc3_gadget_wakeup(struct dwc3 *dwc) if ((speed == DWC3_DSTS_SUPERSPEED) || (speed == DWC3_DSTS_SUPERSPEED_PLUS)) { dwc3_trace(trace_dwc3_gadget, "no wakeup on SuperSpeed\n"); - return -EINVAL; + return 0; } link_state = DWC3_DSTS_USBLNKST(reg);