Skip to content

Commit

Permalink
mmc: core: Fix use of uninitialized data in mmc_send_if_cond.
Browse files Browse the repository at this point in the history
mmc_send_if_cond did not zero out mmc_command on stack.

Signed-off-by: Chris Ball <cjb@laptop.org>
  • Loading branch information
Chris Ball committed May 25, 2011
1 parent 87f6119 commit 30574ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/mmc/core/sd_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 30574ed

Please sign in to comment.