usb: host: xhci-mem: drop useless loop increment
Subsystems (2)
PATCH 1/1 usb: host: xhci-mem: drop useless loop increment
The 'tt_info' local variable is assigned to a result of kzalloc_node() call in the body of the *for* loop in xhci_alloc_tt_info() and then incremented after that body is executed for no apparent reason -- drop that increment.
Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool.
Signed-off-by Sergey Shtylyov <[email protected]>
---
This patch is against the 'usb-next' branch of Greg KH's 'usb.git' repo.
drivers/usb/host/xhci-mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/xhci-mem.c +1 -1
@@ -836,7 +836,7 @@ int xhci_alloc_tt_info(struct xhci_hcd *else num_ports = hdev->maxchild; -for (i =0 ; i < num_ports; i++, tt_info++) { +for (i =0 ; i < num_ports; i++) {struct xhci_interval_bw_table *bw_table; tt_info = kzalloc_node(sizeof(*tt_info), mem_flags,