linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ethernet: ti: am65-cpsw-nuss: fix ale parameters init
@ 2020-06-13 14:52 Grygorii Strashko
  2020-06-13 22:36 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Grygorii Strashko @ 2020-06-13 14:52 UTC (permalink / raw)
  To: David S. Miller, netdev, Jakub Kicinski
  Cc: Sekhar Nori, linux-kernel, linux-omap, Grygorii Strashko

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")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index 87a4775ed53a..1492648247d9 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -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;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: ethernet: ti: am65-cpsw-nuss: fix ale parameters init
  2020-06-13 14:52 [PATCH] net: ethernet: ti: am65-cpsw-nuss: fix ale parameters init Grygorii Strashko
@ 2020-06-13 22:36 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-06-13 22:36 UTC (permalink / raw)
  To: grygorii.strashko; +Cc: netdev, kuba, nsekhar, linux-kernel, linux-omap

From: Grygorii Strashko <grygorii.strashko@ti.com>
Date: Sat, 13 Jun 2020 17:52:59 +0300

> 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")
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-13 22:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-13 14:52 [PATCH] net: ethernet: ti: am65-cpsw-nuss: fix ale parameters init Grygorii Strashko
2020-06-13 22:36 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).