projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6afbdb5
)
usb: dwc3: gadget: reduce scope of ret variable
author
Felipe Balbi
<felipe.balbi@linux.intel.com>
Fri, 6 Apr 2018 12:50:29 +0000
(15:50 +0300)
committer
Felipe Balbi
<felipe.balbi@linux.intel.com>
Mon, 21 May 2018 07:00:57 +0000
(10:00 +0300)
We can declare it inside list_for_each_entry_safe() loop and reduce
its scope.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/gadget.c
patch
|
blob
|
history
diff --git
a/drivers/usb/dwc3/gadget.c
b/drivers/usb/dwc3/gadget.c
index e230b0a2a2f3900c20f3b5d4db375c276e7382f3..263f9506102f02247add82fa48751b89af6000ee 100644
(file)
--- a/
drivers/usb/dwc3/gadget.c
+++ b/
drivers/usb/dwc3/gadget.c
@@
-2313,10
+2313,10
@@
static void dwc3_gadget_ep_cleanup_completed_requests(struct dwc3_ep *dep,
{
struct dwc3_request *req;
struct dwc3_request *tmp;
- int ret = 0;
list_for_each_entry_safe(req, tmp, &dep->started_list, list) {
unsigned length;
+ int ret;
length = req->request.length;
if (req->num_pending_sgs)