net: ethernet: mtk_eth_soc: fix build_skb cleanup
authorIlya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Fri, 23 Apr 2021 05:20:56 +0000 (22:20 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Apr 2021 20:31:57 +0000 (13:31 -0700)
commit787082ab9f7be4711e52f67c388535eda74a1269
treee177587a74526025252b8dcfcce3095ca040d7a4
parent5196c417854942e218a59ec87bf7d414b3bd581e
net: ethernet: mtk_eth_soc: fix build_skb cleanup

In case build_skb fails, call skb_free_frag on the correct pointer. Also
update the DMA structures with the new mapping before exiting, because
the mapping was successful

Suggested-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.c