]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mmc: core: remove redundant memset of sdio_read_cccr
authorShawn Lin <shawn.lin@rock-chips.com>
Mon, 14 Mar 2016 04:41:33 +0000 (12:41 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 17 Mar 2016 13:54:41 +0000 (14:54 +0100)
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>
drivers/mmc/core/sdio.c

index 467b3cf80c44549c704080d78540c46599eb6882..bd44ba8116d1584767e15ace328c72efb133f272 100644 (file)
@@ -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;