diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/fsl_esdhc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index f87e647..a7170b4 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -518,6 +518,8 @@ int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg) return -1; mmc = malloc(sizeof(struct mmc)); + if (!mmc) + return -ENOMEM; sprintf(mmc->name, "FSL_SDHC"); regs = (struct fsl_esdhc *)cfg->esdhc_base; |