From 4a41fec589b5f57bc83fca423222c6a1860a50f5 Mon Sep 17 00:00:00 2001 From: Alex Kiernan Date: Fri, 9 Feb 2018 15:24:38 +0000 Subject: [PATCH] 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 Tested-by: Robert Nelson Reviewed-by: Sam Protsenko --- drivers/mmc/omap_hsmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index 24027f2b34..02970f29b2 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; -- 2.39.2