aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro
diff options
context:
space:
mode:
authorFabrice Gasnier <fabrice.gasnier@st.com>2014-11-04 11:08:06 -0500
committerDavid S. Miller <davem@davemloft.net>2014-11-05 16:22:56 -0500
commit758a0ab59b9bed75d8c8fcaed3cb41f10a586793 (patch)
tree29977d24397ce706b09fdd4551230befb448095d /drivers/net/ethernet/stmicro
parent16ee817e4365cdfe665ae8d6f6bc8f09befa1272 (diff)
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/stmicro')
-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)
2026 return NETDEV_TX_OK; 2026 return NETDEV_TX_OK;
2027 2027
2028dma_map_err: 2028dma_map_err:
2029 spin_unlock(&priv->tx_lock);
2029 dev_err(priv->device, "Tx dma map failed\n"); 2030 dev_err(priv->device, "Tx dma map failed\n");
2030 dev_kfree_skb(skb); 2031 dev_kfree_skb(skb);
2031 priv->dev->stats.tx_dropped++; 2032 priv->dev->stats.tx_dropped++;