]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mmc: core: remove redundant memset of mmc_decode_cid
authorShawn Lin <shawn.lin@rock-chips.com>
Fri, 11 Mar 2016 16:35:45 +0000 (00:35 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 17 Mar 2016 13:54:41 +0000 (14:54 +0100)
When initializing sd or sdio card, we get struct mmc_card
from mmc_alloc_card which allocates it by kzalloc. So we don't
need another memset while decoding cid.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/sd.c

index bb39a29b2db68d72c5e34d7e408cce0105c110a7..b95bd24d92f415f4c8da8d622da62be6e6a61b5e 100644 (file)
@@ -74,8 +74,6 @@ void mmc_decode_cid(struct mmc_card *card)
 {
        u32 *resp = card->raw_cid;
 
-       memset(&card->cid, 0, sizeof(struct mmc_cid));
-
        /*
         * SD doesn't currently have a version field so we will
         * have to assume we can parse this.