On Tue, Aug 18, 2020 at 10:05:51AM +0000, Peter Chen wrote: > > > > > > > diff --git a/drivers/usb/gadget/udc/core.c > > > b/drivers/usb/gadget/udc/core.c index 473e74088b1f..43351b0af569 > > > 100644 > > > --- a/drivers/usb/gadget/udc/core.c > > > +++ b/drivers/usb/gadget/udc/core.c > > > @@ -1386,7 +1386,6 @@ void usb_del_gadget_udc(struct usb_gadget > > > *gadget) { > > > usb_del_gadget(gadget); > > > usb_put_gadget(gadget); > > > - memset(&gadget->dev, 0x00, sizeof(gadget->dev)); > > > > Shouldn't you do this patch earlier in the series, as the > > usb_put_gadget() call could have freed the memory that is being cleared here? > > > > If I did it earlier, it would cause dwc3 break if people do 'git bisect', dwc3 issue is > fixed at patch 5. If you use the patch I posted earlier: https://marc.info/?l=linux-usb&m=159605415210351&w=2 instead of this one then dwc3 would continue to work correctly during the intermediate stages of the series. Alan Stern