We can declare it inside list_for_each_entry_safe() loop and reduce
its scope.

Signed-off-by: Felipe Balbi <felipe.ba...@linux.intel.com>
---
 drivers/usb/dwc3/gadget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 99962de67715..3a4013bc61d8 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2288,10 +2288,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)
-- 
2.16.1

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

Reply via email to