diff options
author | Andrei Warkentin <andreiw@motorola.com> | 2011-04-13 16:33:12 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-05-24 21:01:38 -0400 |
commit | 87f6119e25bbe0fd60e76f599d5fa10cf489519c (patch) | |
tree | 10cc6964609facbddb8653b04475dfd33850ab01 /drivers/mmc/core | |
parent | 6a7a6b45f454686a1549729bfbae31f0b3b595d6 (diff) |
mmc: core: Fix use of uninitialized data in mmc_cmd_app.
mmc_cmd_app did not zero out mmc_command on stack.
Reported-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Signed-off-by: Andrei Warkentin <andreiw@motorola.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r-- | drivers/mmc/core/sd_ops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c index 76af349c14b4..71fdb07fd8de 100644 --- a/drivers/mmc/core/sd_ops.c +++ b/drivers/mmc/core/sd_ops.c | |||
@@ -29,6 +29,8 @@ static int mmc_app_cmd(struct mmc_host *host, struct mmc_card *card) | |||
29 | BUG_ON(!host); | 29 | BUG_ON(!host); |
30 | BUG_ON(card && (card->host != host)); | 30 | BUG_ON(card && (card->host != host)); |
31 | 31 | ||
32 | memset(&cmd, 0, sizeof(struct mmc_command)); | ||
33 | |||
32 | cmd.opcode = MMC_APP_CMD; | 34 | cmd.opcode = MMC_APP_CMD; |
33 | 35 | ||
34 | if (card) { | 36 | if (card) { |