OSDN Git Service

mmc: core: Remove unused variable cached_ext_csd
authorSayali Lokhande <sayalil@codeaurora.org>
Tue, 4 Apr 2017 08:38:50 +0000 (14:08 +0530)
committerSayali Lokhande <sayalil@codeaurora.org>
Tue, 4 Apr 2017 08:38:50 +0000 (14:08 +0530)
There is one variable defined in mmc_card, which
is not being used anywhere. Also it is wrongly
being freed from mmc_remove_card and causing
"double kfree" related issues.
To handle this, remove unused cached_ext_csd variable.

Change-Id: I75f376ec787a46a2a16c38f88f444bd8ff9c86c4
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
drivers/mmc/core/bus.c
drivers/mmc/core/mmc.c
include/linux/mmc/card.h

index ec6075e..311f6d6 100644 (file)
@@ -428,7 +428,6 @@ void mmc_remove_card(struct mmc_card *card)
        }
 
        kfree(card->wr_pack_stats.packing_events);
-       kfree(card->cached_ext_csd);
 
        put_device(&card->dev);
 }
index 542f173..5ab09b4 100644 (file)
@@ -722,7 +722,6 @@ static int mmc_read_ext_csd(struct mmc_card *card)
                return err;
        }
 
-       card->cached_ext_csd = ext_csd;
        err = mmc_decode_ext_csd(card, ext_csd);
        kfree(ext_csd);
        return err;
index 1c87478..3d42652 100644 (file)
@@ -432,7 +432,6 @@ struct mmc_card {
        struct mmc_wr_pack_stats wr_pack_stats; /* packed commands stats*/
        struct notifier_block        reboot_notify;
        enum mmc_pon_type pon_type;
-       u8 *cached_ext_csd;
        bool cmdq_init;
        struct mmc_bkops_info bkops;
 };