[PATCH v5 02/25] usb: gadget: ci13xxx: fix ep list removal in gadget unregistering code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 9c10fab..8175f74 100644
--- a/drivers/usb/gadget/ci13xxx_udc.c
+++ b/drivers/usb/gadget/ci13xxx_udc.c
@@ -2738,7 +2738,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)
-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux