Browse Source

amd-xgbe: Fix initialization of the wrong spin lock

During allocation and initialization of the network driver structures,
the wrong pointer is used to initialize a spin lock. Fix the spin lock
initialization by using the proper pointer.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Lendacky, Thomas 11 years ago
parent
commit
bec6bfb243
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/net/ethernet/amd/xgbe/xgbe-main.c

+ 1 - 1
drivers/net/ethernet/amd/xgbe/xgbe-main.c

@@ -172,7 +172,7 @@ static struct xgbe_channel *xgbe_alloc_rings(struct xgbe_prv_data *pdata)
 		}
 
 		if (i < pdata->rx_ring_count) {
-			spin_lock_init(&tx_ring->lock);
+			spin_lock_init(&rx_ring->lock);
 			channel->rx_ring = rx_ring++;
 		}