[U-Boot] [PATCH] driver: net: fsl-mc: Memset dprc_cfg before configuring
Prabhakar Kushwaha
prabhakar.kushwaha at nxp.com
Wed Jan 20 07:34:19 CET 2016
From: Prabhakar Kushwaha <prabhakar at freescale.com>
All fields of struct dprc_cfg are not being configured while creating
child container. "Not" configured fields are assumed to be 0.
So memset dprc_cfg before configuring the fields.
Signed-off-by: Itai Katz <itai.katz at nxp.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha at nxp.com>
---
drivers/net/fsl-mc/mc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index bac4610..6269dab 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -784,6 +784,7 @@ static int dprc_init(void)
goto err_root_open;
}
+ memset(&cfg, 0, sizeof(struct dprc_cfg));
cfg.options = DPRC_CFG_OPT_TOPOLOGY_CHANGES_ALLOWED |
DPRC_CFG_OPT_OBJ_CREATE_ALLOWED |
DPRC_CFG_OPT_ALLOC_ALLOWED;
--
1.9.1
More information about the U-Boot
mailing list