Skip to content
Snippets Groups Projects
Commit 1a9d1731 authored by Tobias Jakobi's avatar Tobias Jakobi Committed by Minkyu Kang
Browse files

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: default avatarLukasz Majewski <l.majewski@samsung.com>
Signed-off-by: default avatarTobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: default avatarMinkyu Kang <mk7.kang@samsung.com>
parent 8e34a74d
No related branches found
No related tags found
No related merge requests found
...@@ -84,9 +84,9 @@ static int s5p_sdhci_core_init(struct sdhci_host *host) ...@@ -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) 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) { if (!host) {
printf("sdhci__host malloc fail!\n"); printf("sdhci__host allocation fail!\n");
return 1; return 1;
} }
host->ioaddr = (void *)regbase; host->ioaddr = (void *)regbase;
......
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