提交 4a41fec5 编写于 作者: A Alex Kiernan 提交者: Jaehoon Chung

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: NAlex Kiernan <alex.kiernan@gmail.com>
Tested-by: NRobert Nelson <robertcnelson@gmail.com>
Reviewed-by: NSam Protsenko <semen.protsenko@linaro.org>
上级 ace1bed3
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册