usb: dwc3: gadget: correct return from ep_queue
authorPratyush Anand <pratyush.anand@st.com>
Mon, 14 Jan 2013 10:29:33 +0000 (15:59 +0530)
committerFelipe Balbi <balbi@ti.com>
Fri, 18 Jan 2013 12:28:36 +0000 (14:28 +0200)
Its better to return from each if condition as they are mutually
exclusive.

Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/gadget.c

index 356a5a2af75074c69bc5dc3baf935c47978875fe..c4ffb3557d62ef78e714ad985f004267cc5a0c4f 100644 (file)
@@ -1097,6 +1097,7 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
                if (ret && ret != -EBUSY)
                        dev_dbg(dwc->dev, "%s: failed to kick transfers\n",
                                        dep->name);
+               return ret;
        }
 
        /*
@@ -1113,6 +1114,7 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
                if (ret && ret != -EBUSY)
                        dev_dbg(dwc->dev, "%s: failed to kick transfers\n",
                                        dep->name);
+               return ret;
        }
 
        return 0;