Commit 1b430799 authored by Sean Wang's avatar Sean Wang Committed by David S. Miller

net: ethernet: mediatek: fix API usage with skb_free_frag

use skb_free_frag() instead of legacy put_page()
Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
Acked-by: default avatarJohn Crispin <john@phrozen.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 549e5495
...@@ -870,7 +870,7 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget, ...@@ -870,7 +870,7 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget,
/* receive data */ /* receive data */
skb = build_skb(data, ring->frag_size); skb = build_skb(data, ring->frag_size);
if (unlikely(!skb)) { if (unlikely(!skb)) {
put_page(virt_to_head_page(new_data)); skb_free_frag(new_data);
netdev->stats.rx_dropped++; netdev->stats.rx_dropped++;
goto release_desc; goto release_desc;
} }
......
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