Skip to content

Commit

Permalink
usb: gadget: ci13xxx: fix ep list removal in gadget unregistering code
Browse files Browse the repository at this point in the history
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@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Alexander Shishkin authored and Greg Kroah-Hartman committed May 8, 2012
1 parent ab59ac0 commit efa015b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/ci13xxx_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit efa015b

Please sign in to comment.