mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
net: ethernet: ti: am65-cpsw: Fix uninitialized variable
The *ndev pointer needs to be set or it leads to an uninitialized variable
bug in the caller.
Fixes: 4a7b2ba94a ("net: ethernet: ti: am65-cpsw: Use tstats instead of open coded version")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Message-ID: <b168d5c7-704b-4452-84f9-1c1762b1f4ce@stanley.mountain>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
This commit is contained in:
parent
f87a17ed3b
commit
ff1d3484d6
|
|
@ -1341,6 +1341,7 @@ am65_cpsw_nuss_tx_compl_packet_xdp(struct am65_cpsw_common *common,
|
|||
|
||||
port = am65_common_get_port(common, port_id);
|
||||
dev_sw_netstats_tx_add(port->ndev, 1, xdpf->len);
|
||||
*ndev = port->ndev;
|
||||
|
||||
return xdpf;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user