]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
USB: Fix unneeded endpoint check in pxa27x_udc
authorRobert Jarzmik <robert.jarzmik@free.fr>
Mon, 13 Oct 2008 18:06:00 +0000 (20:06 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 22 Oct 2008 17:05:28 +0000 (10:05 -0700)
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 <robert.jarzmik@free.fr>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/pxa27x_udc.c

index bcf375ca3d7279d43d66dae544211d5a70edde52..caa37c95802c925ad9f9caff5f71071e69e22383 100644 (file)
@@ -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);