Its better to return from each if condition as they are mutually
exclusive.

Signed-off-by: Pratyush Anand <[email protected]>
---
 drivers/usb/dwc3/gadget.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 786e16f..fc7efea 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -1105,8 +1105,6 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, 
struct dwc3_request *req)
         *
         */
        if (dep->flags & DWC3_EP_PENDING_REQUEST) {
-               int     ret;
-
                /*
                 * If xfernotready is already elapsed and it is a case
                 * of isoc transfer, then issue END TRANSFER, so that
@@ -1128,6 +1126,7 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, 
struct dwc3_request *req)
                        dev_dbg(dwc->dev, "%s: failed to kick transfers\n",
                                        dep->name);
                }
+               return ret;
        }
 
        /*
@@ -1147,6 +1146,7 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, 
struct dwc3_request *req)
                        dev_dbg(dwc->dev, "%s: failed to kick transfers\n",
                                        dep->name);
                }
+               return ret;
        }
 
        return 0;
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to