diff options
author | Tobias Jakobi <tjakobi@math.uni-bielefeld.de> | 2015-10-05 13:47:50 +0200 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2015-10-13 20:22:28 +0900 |
commit | 1a9d1731f93ad170f0c19b93407630b0fb966fd0 (patch) | |
tree | 95b3f114dbeeea5f814aca9f9c0374b6db072d2a /drivers/mmc | |
parent | 8e34a74d6979c6281042b97f3f00b1688dc65539 (diff) | |
download | u-boot-imx-1a9d1731f93ad170f0c19b93407630b0fb966fd0.zip u-boot-imx-1a9d1731f93ad170f0c19b93407630b0fb966fd0.tar.gz u-boot-imx-1a9d1731f93ad170f0c19b93407630b0fb966fd0.tar.bz2 |
exynos: Properly zero initialize host in s5p_sdhci_init()
This makes sure that setting the host_caps in s5p_sdhci_core_init()
doesn't operate on potentially uninitialized memory.
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/s5p_sdhci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c index 4db51d6..911e7a8 100644 --- a/drivers/mmc/s5p_sdhci.c +++ b/drivers/mmc/s5p_sdhci.c @@ -84,9 +84,9 @@ static int s5p_sdhci_core_init(struct sdhci_host *host) int s5p_sdhci_init(u32 regbase, int index, int bus_width) { - struct sdhci_host *host = malloc(sizeof(struct sdhci_host)); + struct sdhci_host *host = calloc(1, sizeof(struct sdhci_host)); if (!host) { - printf("sdhci__host malloc fail!\n"); + printf("sdhci__host allocation fail!\n"); return 1; } host->ioaddr = (void *)regbase; |