diff --git a/drivers/usb/gadget/ci13xxx_udc.c b/drivers/usb/gadget/ci13xxx_udc.c index 1a44bf9c374fd41907f9c49a06873b18b5154d20..b6f359ce157ddce9b7a72b9c55d3407307adfee2 100644 --- a/drivers/usb/gadget/ci13xxx_udc.c +++ b/drivers/usb/gadget/ci13xxx_udc.c @@ -2737,7 +2737,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) list_del_init(&mEp->ep.ep_list); if (mEp->qh.ptr != NULL)