From 3ba0b31aed94167998defadfbf17d2196db05814 Mon Sep 17 00:00:00 2001 From: Ido Shayevitz Date: Mon, 4 Jun 2012 13:35:26 +0300 Subject: [PATCH] usb: gadget: pxa25x_udc: Remove unneeded condition The removed condition is always true, since the endpoint descriptor is set prior to calling the enable endpoint. Signed-off-by: Ido Shayevitz Signed-off-by: Felipe Balbi --- drivers/usb/gadget/pxa25x_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c index d7c8cb3bf75..f7ff9e8e746 100644 --- a/drivers/usb/gadget/pxa25x_udc.c +++ b/drivers/usb/gadget/pxa25x_udc.c @@ -218,7 +218,7 @@ static int pxa25x_ep_enable (struct usb_ep *_ep, struct pxa25x_udc *dev; ep = container_of (_ep, struct pxa25x_ep, ep); - if (!_ep || !desc || ep->ep.desc || _ep->name == ep0name + if (!_ep || !desc || _ep->name == ep0name || desc->bDescriptorType != USB_DT_ENDPOINT || ep->bEndpointAddress != desc->bEndpointAddress || ep->fifo_size < usb_endpoint_maxp (desc)) { -- 2.20.1