summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrabhakar Kushwaha <prabhakar@freescale.com>2016-01-20 12:04:19 +0530
committerYork Sun <york.sun@nxp.com>2016-02-01 09:11:11 -0800
commit5373b204dfbd33349486e4030c6135e180a25e54 (patch)
tree33246f12a1b29e90ec387cdfc7d50ba89448fbd6
parentcc7b8b9abb1de3b9957203afbeb9504a40fd2ca4 (diff)
driver: net: fsl-mc: Memset dprc_cfg before configuring
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>
-rw-r--r--drivers/net/fsl-mc/mc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index d38e98a2fb..bac7d239e3 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -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;