Commit 758a0ab5 authored by Fabrice Gasnier's avatar Fabrice Gasnier Committed by David S. Miller

stmmac: release tx lock, in case of dma mapping error.

Add missing spin_unlock when tx frames gets dropped.
Signed-off-by: default avatarFabrice Gasnier <fabrice.gasnier@st.com>
Acked-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 16ee817e
......@@ -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++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment