net: ethernet: mediatek: fix API usage with skb_free_frag

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>
This commit is contained in:
Sean Wang 2016-09-01 10:47:29 +08:00 committed by David S. Miller
parent 549e549546
commit 1b43079906

View file

@ -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;
}