From: Robert Jarzmik Date: Mon, 13 Oct 2008 18:06:00 +0000 (+0200) Subject: USB: Fix unneeded endpoint check in pxa27x_udc X-Git-Tag: v3.12-rc1~17539^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3131f7b0ab9ed461daa2464fffd9df784d1f730d;p=kernel%2Fkernel-generic.git USB: Fix unneeded endpoint check in pxa27x_udc The request allocation code doesn't need to check if the endpoint is not NULL, as the only caller in include/linux/usb/gadget.h, usb_ep_alloc_request() needs the endpoint pointer to have a correct value to trigger the allocation code. Signed-off-by: Robert Jarzmik Acked-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index bcf375c..caa37c9 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c @@ -650,7 +650,7 @@ pxa_ep_alloc_request(struct usb_ep *_ep, gfp_t gfp_flags) struct pxa27x_request *req; req = kzalloc(sizeof *req, gfp_flags); - if (!req || !_ep) + if (!req) return NULL; INIT_LIST_HEAD(&req->queue);