提交 3131f7b0 编写于 作者: R Robert Jarzmik 提交者: Greg Kroah-Hartman

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: NRobert Jarzmik <robert.jarzmik@free.fr>
Acked-by: NAlan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 dd9ebf14
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册