From: Ido Shayevitz Date: Mon, 4 Jun 2012 10:35:22 +0000 (+0300) Subject: usb: gadget: goku_udc: Remove unneeded condition X-Git-Tag: v3.5~124^2~4^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aedaa44dd3214886d70fad92197b98a0ba286cb8;p=platform%2Fkernel%2Flinux-amlogic.git usb: gadget: goku_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 --- diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c index b241e6c..3d28fb9 100644 --- a/drivers/usb/gadget/goku_udc.c +++ b/drivers/usb/gadget/goku_udc.c @@ -102,7 +102,7 @@ goku_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc) unsigned long flags; ep = container_of(_ep, struct goku_ep, ep); - if (!_ep || !desc || ep->ep.desc + if (!_ep || !desc || desc->bDescriptorType != USB_DT_ENDPOINT) return -EINVAL; dev = ep->dev;