* [PATCH net-next] net: ethernet: ti: am65-cpsw: Fix uninitialized variable
@ 2024-10-16 14:41 Dan Carpenter
2024-10-16 18:57 ` Roger Quadros
2024-10-17 23:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2024-10-16 14:41 UTC (permalink / raw)
To: Simon Horman
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Dave Penkler, Greg Kroah-Hartman, Roger Quadros,
Julien Panis, Chintan Vankar, Nicolas Pitre, Grygorii Strashko,
netdev, linux-kernel, linux-staging, kernel-janitors
The *ndev pointer needs to be set or it leads to an uninitialized variable
bug in the caller.
Fixes: 4a7b2ba94a59 ("net: ethernet: ti: am65-cpsw: Use tstats instead of open coded version")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/net/ethernet/ti/am65-cpsw-nuss.c | 1 +
1 files changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index cda7ddfe6845..fe1f2fa0ff9c 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -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;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: ethernet: ti: am65-cpsw: Fix uninitialized variable
2024-10-16 14:41 [PATCH net-next] net: ethernet: ti: am65-cpsw: Fix uninitialized variable Dan Carpenter
@ 2024-10-16 18:57 ` Roger Quadros
2024-10-17 23:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Roger Quadros @ 2024-10-16 18:57 UTC (permalink / raw)
To: Dan Carpenter, Simon Horman
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Dave Penkler, Greg Kroah-Hartman, Julien Panis,
Chintan Vankar, Nicolas Pitre, Grygorii Strashko, netdev,
linux-kernel, linux-staging, kernel-janitors
On 16/10/2024 17:41, Dan Carpenter wrote:
> The *ndev pointer needs to be set or it leads to an uninitialized variable
> bug in the caller.
>
> Fixes: 4a7b2ba94a59 ("net: ethernet: ti: am65-cpsw: Use tstats instead of open coded version")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Thanks Dan for this fix!
Reviewed-by: Roger Quadros <rogerq@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: ethernet: ti: am65-cpsw: Fix uninitialized variable
2024-10-16 14:41 [PATCH net-next] net: ethernet: ti: am65-cpsw: Fix uninitialized variable Dan Carpenter
2024-10-16 18:57 ` Roger Quadros
@ 2024-10-17 23:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-17 23:10 UTC (permalink / raw)
To: Dan Carpenter
Cc: horms, andrew+netdev, davem, edumazet, kuba, pabeni, dpenkler,
gregkh, rogerq, jpanis, c-vankar, npitre, grygorii.strashko,
netdev, linux-kernel, linux-staging, kernel-janitors
Hello:
This patch was applied to netdev/net-next.git (main)
by Andrew Lunn <andrew@lunn.ch>:
On Wed, 16 Oct 2024 17:41:44 +0300 you wrote:
> The *ndev pointer needs to be set or it leads to an uninitialized variable
> bug in the caller.
>
> Fixes: 4a7b2ba94a59 ("net: ethernet: ti: am65-cpsw: Use tstats instead of open coded version")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> drivers/net/ethernet/ti/am65-cpsw-nuss.c | 1 +
> 1 files changed, 1 insertion(+)
Here is the summary with links:
- [net-next] net: ethernet: ti: am65-cpsw: Fix uninitialized variable
https://git.kernel.org/netdev/net-next/c/ff1d3484d6d2
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-17 23:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-16 14:41 [PATCH net-next] net: ethernet: ti: am65-cpsw: Fix uninitialized variable Dan Carpenter
2024-10-16 18:57 ` Roger Quadros
2024-10-17 23:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox