summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLendacky, Thomas <Thomas.Lendacky@amd.com>2014-09-02 16:40:22 +0200
committerDavid S. Miller <davem@davemloft.net>2014-09-02 23:03:37 +0200
commitbec6bfb2437f4676dbaaacba6019e9dafef18962 (patch)
tree8a7e6bc1b329c9fc10f8175ce77e4c0c552d6d2d /drivers
parentopenvswitch: fix a memory leak (diff)
downloadlinux-bec6bfb2437f4676dbaaacba6019e9dafef18962.tar.xz
linux-bec6bfb2437f4676dbaaacba6019e9dafef18962.zip
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/amd/xgbe/xgbe-main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-main.c b/drivers/net/ethernet/amd/xgbe/xgbe-main.c
index 8aa6a9353f7b..bdf9cfa70e88 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-main.c
+++ b/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++;
}