diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-01-04 02:20:09 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-01-24 04:31:56 -0500 |
commit | 10800f2ca1a78e24cf92dc5e16a68a9b78f91bbe (patch) | |
tree | 668e583d8c23f5cd6c97a182014c70881862b754 | |
parent | d81f3e4f5792acab5929ef99aad6ca5e21a31a0e (diff) |
usb: gadget: mv_udc: remove unneeded NULL check
We've dereferenced req already, and we checked for bogus parameters at
the start of the function.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/gadget/mv_udc_core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index f97e737d26f7..8dd398b99e2f 100644 --- a/drivers/usb/gadget/mv_udc_core.c +++ b/drivers/usb/gadget/mv_udc_core.c | |||
@@ -771,8 +771,7 @@ mv_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags) | |||
771 | udc->ep0_state = DATA_STATE_XMIT; | 771 | udc->ep0_state = DATA_STATE_XMIT; |
772 | 772 | ||
773 | /* irq handler advances the queue */ | 773 | /* irq handler advances the queue */ |
774 | if (req != NULL) | 774 | list_add_tail(&req->queue, &ep->queue); |
775 | list_add_tail(&req->queue, &ep->queue); | ||
776 | spin_unlock_irqrestore(&udc->lock, flags); | 775 | spin_unlock_irqrestore(&udc->lock, flags); |
777 | 776 | ||
778 | return 0; | 777 | return 0; |