提交 efa015bb 编写于 作者: A Alexander Shishkin 提交者: Greg Kroah-Hartman

usb: gadget: ci13xxx: fix ep list removal in gadget unregistering code

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: NAlexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 ab59ac01
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册