]> git.sur5r.net Git - u-boot/commitdiff
driver: net: fsl-mc: Memset dprc_cfg before configuring
authorPrabhakar Kushwaha <prabhakar@freescale.com>
Wed, 20 Jan 2016 06:34:19 +0000 (12:04 +0530)
committerYork Sun <york.sun@nxp.com>
Mon, 1 Feb 2016 17:11:11 +0000 (09:11 -0800)
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@nxp.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
drivers/net/fsl-mc/mc.c

index d38e98a2fb76202c720837ad6d65aafb9669eb3f..bac7d239e306131bfc5b670a58002c3ecfd6d427 100644 (file)
@@ -818,6 +818,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;