Commit f3e5c070 authored by Huang Zijiang's avatar Huang Zijiang Committed by David S. Miller

net:ethernet:cadence: Replace dev_kfree_skb_any by dev_consume_skb_any

The skb should be freed by dev_consume_skb_any() in macb_pad_and_fcs()
when *skb is still used. The *skb is be replaced by nskb, so the
original *skb should be consumed(not drop).
Signed-off-by: default avatarHuang Zijiang <huang.zijiang@zte.com.cn>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 62f25898
......@@ -1734,7 +1734,7 @@ static int macb_pad_and_fcs(struct sk_buff **skb, struct net_device *ndev)
if (!nskb)
return -ENOMEM;
dev_kfree_skb_any(*skb);
dev_consume_skb_any(*skb);
*skb = nskb;
}
......
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