mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
16ee817e43
commit
758a0ab59b
|
@ -2026,6 +2026,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||||
return NETDEV_TX_OK;
|
return NETDEV_TX_OK;
|
||||||
|
|
||||||
dma_map_err:
|
dma_map_err:
|
||||||
|
spin_unlock(&priv->tx_lock);
|
||||||
dev_err(priv->device, "Tx dma map failed\n");
|
dev_err(priv->device, "Tx dma map failed\n");
|
||||||
dev_kfree_skb(skb);
|
dev_kfree_skb(skb);
|
||||||
priv->dev->stats.tx_dropped++;
|
priv->dev->stats.tx_dropped++;
|
||||||
|
|
Loading…
Reference in New Issue