Skip to content

Commit

Permalink
usb: chipidea: udc: compress return logic into line
Browse files Browse the repository at this point in the history
Simplify return logic to avoid unnecessary variable assignment.

This issue was detected using Coccinelle and the following
semantic patch:

@@
local idexpression ret;
expression e;
@@

-ret =
+return
     e;
-return ret;

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
  • Loading branch information
GustavoARSilva authored and Peter Chen committed Jul 19, 2017
1 parent 5771a8c commit 734c58a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/usb/chipidea/udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,6 @@ isr_setup_status_complete(struct usb_ep *ep, struct usb_request *req)
*/
static int isr_setup_status_phase(struct ci_hdrc *ci)
{
int retval;
struct ci_hw_ep *hwep;

/*
Expand All @@ -960,9 +959,7 @@ static int isr_setup_status_phase(struct ci_hdrc *ci)
ci->status->context = ci;
ci->status->complete = isr_setup_status_complete;

retval = _ep_queue(&hwep->ep, ci->status, GFP_ATOMIC);

return retval;
return _ep_queue(&hwep->ep, ci->status, GFP_ATOMIC);
}

/**
Expand Down

0 comments on commit 734c58a

Please sign in to comment.