Skip to content

Commit

Permalink
can: wrong index used in inner loop
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
roel kluin authored and David S. Miller committed Mar 14, 2011
1 parent 423cfa7 commit 0b32211
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/can/usb/esd_usb2.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ static int esd_usb2_start(struct esd_usb2_net_priv *priv)
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++) {
Expand All @@ -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;
}
}
}
Expand Down

0 comments on commit 0b32211

Please sign in to comment.