On Tue, Apr 10, 2012 at 05:25:10PM +0300, Alexander Shishkin wrote: > Since ep0{out,in} are never on gadget's ep_list, there's no need to try > to unlink them, even more so because ep_list linkage is not initialized > for these endpoints. > > Signed-off-by: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx> > --- > drivers/usb/gadget/ci13xxx_udc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/gadget/ci13xxx_udc.c b/drivers/usb/gadget/ci13xxx_udc.c > index 243ef1a..7e51aa9 100644 > --- a/drivers/usb/gadget/ci13xxx_udc.c > +++ b/drivers/usb/gadget/ci13xxx_udc.c > @@ -2735,7 +2735,7 @@ static int ci13xxx_stop(struct usb_gadget_driver *driver) > for (i = 0; i < hw_ep_max; i++) { > struct ci13xxx_ep *mEp = &udc->ci13xxx_ep[i]; > > - if (!list_empty(&mEp->ep.ep_list)) > + if (mEp->num) you should still make sure list isn't empty before trying to delete, right ? so if (mEp->num && !list_empty(&mEp->ep.ep_list)) ?? -- balbi
Attachment:
signature.asc
Description: Digital signature