From: Felipe Balbi Date: Fri, 6 Apr 2018 12:50:29 +0000 (+0300) Subject: usb: dwc3: gadget: reduce scope of ret variable X-Git-Tag: v4.19~894^2~81^2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fee73e6144d8a0399d17f9ca3b7e5121057eab2d;p=platform%2Fkernel%2Flinux-rpi.git usb: dwc3: gadget: reduce scope of ret variable We can declare it inside list_for_each_entry_safe() loop and reduce its scope. Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index e230b0a..263f950 100644 --- 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)