From 30574ed143e10dd19295b7d80be55f2cd6764c6f Mon Sep 17 00:00:00 2001 From: Chris Ball Date: Wed, 13 Apr 2011 16:25:30 -0400 Subject: [PATCH] mmc: core: Fix use of uninitialized data in mmc_send_if_cond. mmc_send_if_cond did not zero out mmc_command on stack. Signed-off-by: Chris Ball --- drivers/mmc/core/sd_ops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c index 71fdb07fd8d..da508497a6e 100644 --- a/drivers/mmc/core/sd_ops.c +++ b/drivers/mmc/core/sd_ops.c @@ -201,6 +201,8 @@ int mmc_send_if_cond(struct mmc_host *host, u32 ocr) static const u8 test_pattern = 0xAA; u8 result_pattern; + memset(&cmd, 0, sizeof(struct mmc_command)); + /* * To support SD 2.0 cards, we must always invoke SD_SEND_IF_COND * before SD_APP_OP_COND. This command will harmlessly fail for -- 2.41.0