aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlex Kiernan <alex.kiernan@gmail.com>2018-02-09 15:24:38 +0000
committerJaehoon Chung <jh80.chung@samsung.com>2018-02-19 17:00:33 +0900
commit4a41fec589b5f57bc83fca423222c6a1860a50f5 (patch)
tree3e36a2164f1949c4f329c4836d1e6c6fd9cb739d /drivers
parentace1bed327411cf3cade45599864df2d461045a0 (diff)
downloadu-boot-4a41fec589b5f57bc83fca423222c6a1860a50f5.zip
u-boot-4a41fec589b5f57bc83fca423222c6a1860a50f5.tar.gz
u-boot-4a41fec589b5f57bc83fca423222c6a1860a50f5.tar.bz2
mmc: Fix uninitialised priv member
When using omap_hsmmc without the device model then the allocation of mmc->priv ends up uninitialised. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Tested-by: Robert Nelson <robertcnelson@gmail.com> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/omap_hsmmc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 24027f2..02970f2 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -1449,7 +1449,7 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
struct mmc_config *cfg;
uint host_caps_val;
- priv = malloc(sizeof(*priv));
+ priv = calloc(1, sizeof(*priv));
if (priv == NULL)
return -1;