Commit 87f6119e authored by Andrei Warkentin's avatar Andrei Warkentin Committed by Chris Ball

mmc: core: Fix use of uninitialized data in mmc_cmd_app.

mmc_cmd_app did not zero out mmc_command on stack.
Reported-by: default avatarChuanxiao Dong <chuanxiao.dong@intel.com>
Signed-off-by: default avatarAndrei Warkentin <andreiw@motorola.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 6a7a6b45
...@@ -29,6 +29,8 @@ static int mmc_app_cmd(struct mmc_host *host, struct mmc_card *card) ...@@ -29,6 +29,8 @@ static int mmc_app_cmd(struct mmc_host *host, struct mmc_card *card)
BUG_ON(!host); BUG_ON(!host);
BUG_ON(card && (card->host != host)); BUG_ON(card && (card->host != host));
memset(&cmd, 0, sizeof(struct mmc_command));
cmd.opcode = MMC_APP_CMD; cmd.opcode = MMC_APP_CMD;
if (card) { if (card) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment