summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorFabrice Gasnier <fabrice.gasnier@st.com>2014-11-04 17:08:06 +0100
committerDavid S. Miller <davem@davemloft.net>2014-11-05 16:22:56 -0500
commit758a0ab59b9bed75d8c8fcaed3cb41f10a586793 (patch)
tree29977d24397ce706b09fdd4551230befb448095d /drivers/net/ethernet
parent16ee817e4365cdfe665ae8d6f6bc8f09befa1272 (diff)
downloadlinux-758a0ab59b9bed75d8c8fcaed3cb41f10a586793.tar.bz2
stmmac: release tx lock, in case of dma mapping error.
Add missing spin_unlock when tx frames gets dropped. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index bcd8a3414722..ee07e7eee647 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2026,6 +2026,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
return NETDEV_TX_OK;
dma_map_err:
+ spin_unlock(&priv->tx_lock);
dev_err(priv->device, "Tx dma map failed\n");
dev_kfree_skb(skb);
priv->dev->stats.tx_dropped++;