Skip to content

Commit

Permalink
mmc: core: remove redundant memset of sdio_read_cccr
Browse files Browse the repository at this point in the history
When initializing sdio card, we get struct mmc_card
from mmc_alloc_card which allocates it by kzalloc. So we
don't need another memset while reading cccr.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Shawn Lin authored and Ulf Hansson committed Mar 17, 2016
1 parent 0076c71 commit a0747eb
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/mmc/core/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ static int sdio_read_cccr(struct mmc_card *card, u32 ocr)
unsigned char data;
unsigned char speed;

memset(&card->cccr, 0, sizeof(struct sdio_cccr));

ret = mmc_io_rw_direct(card, 0, 0, SDIO_CCCR_CCCR, 0, &data);
if (ret)
goto out;
Expand Down

0 comments on commit a0747eb

Please sign in to comment.