diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-04-06 14:51:49 +0200 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-05-21 09:00:57 +0200 |
commit | 6d9d22dac114c35f794cf28104cbc5af7acc8232 (patch) | |
tree | 4d946d874951597eaafdd121562d731a39fe9a13 /drivers/usb/dwc3/gadget.c | |
parent | usb: dwc3: gadget: reduce scope of ret variable (diff) | |
download | linux-6d9d22dac114c35f794cf28104cbc5af7acc8232.tar.xz linux-6d9d22dac114c35f794cf28104cbc5af7acc8232.zip |
usb: dwc3: gadget: get rid of the length variable
Code is just as readable without it.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/gadget.c')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 263f9506102f..a4ba5d3a5332 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2315,10 +2315,8 @@ static void dwc3_gadget_ep_cleanup_completed_requests(struct dwc3_ep *dep, struct dwc3_request *tmp; list_for_each_entry_safe(req, tmp, &dep->started_list, list) { - unsigned length; int ret; - length = req->request.length; if (req->num_pending_sgs) ret = dwc3_gadget_ep_reclaim_trb_sg(dep, req, event, status); @@ -2333,7 +2331,7 @@ static void dwc3_gadget_ep_cleanup_completed_requests(struct dwc3_ep *dep, req->zero = false; } - req->request.actual = length - req->remaining; + req->request.actual = req->request.length - req->remaining; if (!dwc3_gadget_ep_request_completed(req) || req->num_pending_sgs) { |