Skip to content

Commit

Permalink
USB: Fix unneeded endpoint check in pxa27x_udc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Robert Jarzmik authored and Greg Kroah-Hartman committed Oct 22, 2008
1 parent dd9ebf1 commit 3131f7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/pxa27x_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3131f7b

Please sign in to comment.