Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <robert.jarzmik@free.fr>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Robert Jarzmik and committed by
Greg Kroah-Hartman
3131f7b0 dd9ebf14

+1 -1
+1 -1
drivers/usb/gadget/pxa27x_udc.c
··· 650 650 struct pxa27x_request *req; 651 651 652 652 req = kzalloc(sizeof *req, gfp_flags); 653 - if (!req || !_ep) 653 + if (!req) 654 654 return NULL; 655 655 656 656 INIT_LIST_HEAD(&req->queue);