net: fec: fix improper use of NETDEV_TX_BUSY
authorZhang Changzhong <zhangchangzhong@huawei.com>
Fri, 28 Oct 2022 02:09:11 +0000 (10:09 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 31 Oct 2022 09:22:32 +0000 (09:22 +0000)
commit06a4df5863f73af193a4ff7abf7cb04058584f06
tree7d44adb7ab7ccccfdd03d58bb6ccb2c1f4fdda3a
parent5715a502447b07f067ee5af36465c7c2b813ff38
net: fec: fix improper use of NETDEV_TX_BUSY

The ndo_start_xmit() method must not free skb when returning
NETDEV_TX_BUSY, since caller is going to requeue freed skb.

Fix it by returning NETDEV_TX_OK in case of dma_map_single() fails.

Fixes: 79f339125ea3 ("net: fec: Add software TSO support")
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c