can: wrong index used in inner loop
authorroel kluin <roel.kluin@gmail.com>
Tue, 8 Mar 2011 09:52:55 +0000 (09:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Mar 2011 21:44:42 +0000 (14:44 -0700)
Index i was already used in the outer loop.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/can/usb/esd_usb2.c

index 05a52754f486a73a3efe3cba72b309a3fb9f72f5..dc53c831ea956fac00f70895867918f688524ae5 100644 (file)
@@ -659,7 +659,7 @@ failed:
 static void unlink_all_urbs(struct esd_usb2 *dev)
 {
        struct esd_usb2_net_priv *priv;
-       int i;
+       int i, j;
 
        usb_kill_anchored_urbs(&dev->rx_submitted);
        for (i = 0; i < dev->net_count; i++) {
@@ -668,8 +668,8 @@ static void unlink_all_urbs(struct esd_usb2 *dev)
                        usb_kill_anchored_urbs(&priv->tx_submitted);
                        atomic_set(&priv->active_tx_jobs, 0);
 
-                       for (i = 0; i < MAX_TX_URBS; i++)
-                               priv->tx_contexts[i].echo_index = MAX_TX_URBS;
+                       for (j = 0; j < MAX_TX_URBS; j++)
+                               priv->tx_contexts[j].echo_index = MAX_TX_URBS;
                }
        }
 }