projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ace1bed
)
mmc: Fix uninitialised priv member
author
Alex Kiernan
<
[email protected]
>
Fri, 9 Feb 2018 15:24:38 +0000
(15:24 +0000)
committer
Jaehoon Chung
<
[email protected]
>
Mon, 19 Feb 2018 08:00:33 +0000
(17:00 +0900)
When using omap_hsmmc without the device model then the allocation
of mmc->priv ends up uninitialised.
Signed-off-by: Alex Kiernan <
[email protected]
>
Tested-by: Robert Nelson <
[email protected]
>
Reviewed-by: Sam Protsenko <
[email protected]
>
drivers/mmc/omap_hsmmc.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/omap_hsmmc.c
b/drivers/mmc/omap_hsmmc.c
index 24027f2b34797fcca86ef9e1977fdb049ad7db13..02970f29b295787a248e530884fee18cbbdb7b69 100644
(file)
--- 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;