mlx4_en: Use correct loop cursor in error path.
authorBenjamin Poirier <bpoirier@suse.de>
Wed, 29 Apr 2015 22:59:35 +0000 (15:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Apr 2015 20:25:14 +0000 (16:25 -0400)
Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Fixes: 9e311e7 ("net/mlx4_en: Use affinity hint")
Acked-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c

index 0f1afc0..bf173d7 100644 (file)
@@ -1721,7 +1721,7 @@ mac_err:
 cq_err:
        while (rx_index--) {
                mlx4_en_deactivate_cq(priv, priv->rx_cq[rx_index]);
-               mlx4_en_free_affinity_hint(priv, i);
+               mlx4_en_free_affinity_hint(priv, rx_index);
        }
        for (i = 0; i < priv->rx_ring_num; i++)
                mlx4_en_deactivate_rx_ring(priv, priv->rx_ring[i]);