From c90024b45998ad2acf82e09f8f5d07023b594dbb Mon Sep 17 00:00:00 2001 From: lintao Date: Fri, 21 Mar 2014 14:01:03 +0800 Subject: [PATCH] mmc: core: Fix mmc_host_rescan triger kernel panic if none SDIO controller configured. host->class_dev will be NULL pointer when this case, just workaround it. --- drivers/mmc/core/host.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 8610b36fee61..7767f14e359b 100755 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -610,11 +610,10 @@ int mmc_host_rescan(struct mmc_host *host) if(!host) host = primary_sdio_host; else - printk("mmc_host_rescan pass in host from argument!\n"); + printk("%s: mmc_host_rescan pass in host from argument!\n", mmc_hostname(host)); } else{ - printk("%s: host isn't initialization successfully.\n", - mmc_hostname(host)); + printk("sdio: host isn't initialization successfully.\n"); return -ENOMEDIUM; } -- 2.34.1