From: Pratyush Anand Date: Mon, 14 Jan 2013 10:29:33 +0000 (+0530) Subject: usb: dwc3: gadget: correct return from ep_queue X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=15f86bde29f0fdfb877d9c753547fa2e2f5ef1fe;p=openwrt%2Fstaging%2Fblogic.git usb: dwc3: gadget: correct return from ep_queue Its better to return from each if condition as they are mutually exclusive. Signed-off-by: Pratyush Anand Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 356a5a2af750..c4ffb3557d62 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -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;