]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: ethernet: ti: am65-cpsw-nuss: fix ale parameters init
authorGrygorii Strashko <grygorii.strashko@ti.com>
Sat, 13 Jun 2020 14:52:59 +0000 (17:52 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Jun 2020 22:35:08 +0000 (15:35 -0700)
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: ddd326a112f7 ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/am65-cpsw-nuss.c

index 87a4775ed53ad4247ef11e6ca1cc6107e17c72a2..1492648247d96ce7966a93bc5a4813bbb625517a 100644 (file)
@@ -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;