Skip to content

Commit

Permalink
net: ethernet: mediatek: fix API usage with skb_free_frag
Browse files Browse the repository at this point in the history
use skb_free_frag() instead of legacy put_page()

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Acked-by: John Crispin <john@phrozen.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sean Wang authored and David S. Miller committed Sep 1, 2016
1 parent 549e549 commit 1b43079
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mediatek/mtk_eth_soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget,
/* receive data */
skb = build_skb(data, ring->frag_size);
if (unlikely(!skb)) {
put_page(virt_to_head_page(new_data));
skb_free_frag(new_data);
netdev->stats.rx_dropped++;
goto release_desc;
}
Expand Down

0 comments on commit 1b43079

Please sign in to comment.