Skip to content
Snippets Groups Projects
Commit 88227a1d authored by Fabio Estevam's avatar Fabio Estevam Committed by Andy Fleming
Browse files

mmc: fsl_esdhc: Use calloc()


A malloc() followed by memset() can be simply replaced by calloc().

Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarAndy Fleming <afleming@freescale.com>
parent a68aac49
No related branches found
No related tags found
No related merge requests found
......@@ -601,8 +601,7 @@ int fsl_esdhc_mmc_init(bd_t *bis)
{
struct fsl_esdhc_cfg *cfg;
cfg = malloc(sizeof(struct fsl_esdhc_cfg));
memset(cfg, 0, sizeof(struct fsl_esdhc_cfg));
cfg = calloc(sizeof(struct fsl_esdhc_cfg), 1);
cfg->esdhc_base = CONFIG_SYS_FSL_ESDHC_ADDR;
cfg->sdhc_clk = gd->arch.sdhc_clk;
return fsl_esdhc_initialize(bis, cfg);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment