Message ID | 3addbea5a12e783a802d57a901785e5c9f7f858d.1582839544.git.nguyenb@codeaurora.org |
---|---|
State | New |
Headers | show |
Series | None | expand |
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index 4558f51..4677603 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -252,12 +252,15 @@ void mmc_unregister_driver(struct mmc_driver *drv) static void mmc_release_card(struct device *dev) { struct mmc_card *card = mmc_dev_to_card(dev); + struct mmc_host *host = card->host; sdio_free_common_cis(card); kfree(card->info); kfree(card); + if (host) + host->card = NULL; } /*