Hello. On 04-06-2012 14:35, Ido Shayevitz wrote:
The removed condition is always true, since the endpoint descriptor is set
Set to what, NULL? I see that it's set after this check. If it was set to non-NULL prior to enabling the endpoint, this wouldn't have allowed to enable it, forcing early return.
prior to calling the enable endpoint.
Signed-off-by: Ido Shayevitz<idos@xxxxxxxxxxxxxx> --- drivers/usb/gadget/atmel_usba_udc.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index e23bf79..9a9bced 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c @@ -599,12 +599,6 @@ usba_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc) spin_lock_irqsave(&ep->udc->lock, flags); - if (ep->ep.desc) { - spin_unlock_irqrestore(&ep->udc->lock, flags); - DBG(DBG_ERR, "ep%d already enabled\n", ep->index); - return -EBUSY; - } - ep->ep.desc = desc; ep->ep.maxpacket = maxpacket;
WBR, Sergei -- 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