Skip to content

Commit

Permalink
exynos: Properly zero initialize host in s5p_sdhci_init()
Browse files Browse the repository at this point in the history
This makes sure that setting the host_caps in s5p_sdhci_core_init()
doesn't operate on potentially uninitialized memory.

Acked-by: Lukasz Majewski <[email protected]>
Signed-off-by: Tobias Jakobi <[email protected]>
Signed-off-by: Minkyu Kang <[email protected]>
  • Loading branch information
tobiasjakobi authored and MinkyuKang committed Oct 13, 2015
1 parent 8e34a74 commit 1a9d173
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mmc/s5p_sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1a9d173

Please sign in to comment.