]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: fec: remove unnecessary NULL pointer check when clearing TX BD ring
authorWei Fang <wei.fang@nxp.com>
Thu, 5 Feb 2026 08:57:36 +0000 (16:57 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 10 Feb 2026 09:58:20 +0000 (10:58 +0100)
commit2dcc93475559168a7d3ccffcc35d79f19416782b
treebbc17ae2d80c497b874d7dd5e0fe71e0933ab4b3
parent2ff7a7d3928bd8bd524d153b84061dc0eba216c2
net: fec: remove unnecessary NULL pointer check when clearing TX BD ring

The tx_buf pointer will not NULL when its type is FEC_TXBUF_T_XDP_NDO or
FEC_TXBUF_T_XDP_TX. If the type is FEC_TXBUF_T_SKB, dev_kfree_skb_any()
will do NULL pointer check. So it is unnecessary to do NULL pointer check
in fec_enet_bd_init() and fec_enet_tx_queue().

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260205085742.2685134-10-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/freescale/fec_main.c