Skip to content

Commit

Permalink
usb: gadget: mv_udc: remove unneeded NULL check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Felipe Balbi committed Jan 24, 2012
1 parent d81f3e4 commit 10800f2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/gadget/mv_udc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,8 +771,7 @@ mv_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
udc->ep0_state = DATA_STATE_XMIT;

/* irq handler advances the queue */
if (req != NULL)
list_add_tail(&req->queue, &ep->queue);
list_add_tail(&req->queue, &ep->queue);
spin_unlock_irqrestore(&udc->lock, flags);

return 0;
Expand Down

0 comments on commit 10800f2

Please sign in to comment.