Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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++;