Skip to contentSkip to conversation

net: ethernet: ti: am65-cpsw-nuss: fix ale parameters init

PATCH In review Grygorii Strashko 2 participants 2 messages Jun 13, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: ethernet: ti: am65-cpsw-nuss: fix ale parameters init

The ALE parameters structure is created on stack, so it has to be reset before passing to cpsw_ale_create() to avoid garbage values.

Fixes 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
---
 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/ti/am65-cpsw-nuss.c +1 -1
index 87a4775ed53a..1492648247d9 100644
@@ -1981,7 +1981,7 @@ MODULE_DEVICE_TABLE(of, am65_cpsw_nuss_of_mtable);
 
 static int am65_cpsw_nuss_probe(struct platform_device *pdev)
 {
-	struct cpsw_ale_params ale_params;
+	struct cpsw_ale_params ale_params = { 0 };
 	const struct of_device_id *of_id;
 	struct device *dev = &pdev->dev;
 	struct am65_cpsw_common *common;
Signature · 1 line
2.17.1
maintainer
#1 lore raw

From: Grygorii Strashko <[email protected]>
Date: Sat, 13 Jun 2020 17:52:59 +0300

Quoted 5 lines

The ALE parameters structure is created on stack, so it has to be reset before passing to cpsw_ale_create() to avoid garbage values.

Fixes 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")

Applied and queued up for v5.7 -stable, thanks.