Commit a6099f26 authored by Nishanth Menon's avatar Nishanth Menon Committed by Paolo Abeni
Browse files

net: ethernet: ti: am65-cpsw-nuss: Fix null pointer dereference for ndev



In the TX completion packet stage of TI SoCs with CPSW2G instance, which
has single external ethernet port, ndev is accessed without being
initialized if no TX packets have been processed. It results into null
pointer dereference, causing kernel to crash. Fix this by having a check
on the number of TX packets which have been processed.

Fixes: 9a369ae3 ("net: ethernet: ti: am65-cpsw: remove am65_cpsw_nuss_tx_compl_packets_2g()")
Signed-off-by: default avatarNishanth Menon <nm@ti.com>
Signed-off-by: default avatarChintan Vankar <c-vankar@ti.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250829121051.2031832-1-c-vankar@ti.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent e27e34bc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment