浏览代码

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>
Robert Jarzmik 16 年之前
父节点
当前提交
3131f7b0ab
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/usb/gadget/pxa27x_udc.c

+ 1 - 1
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);