From: Jaehoon Chung Date: Fri, 15 Feb 2013 14:45:45 +0000 (+0900) Subject: mmc: dw_mmc: return the result of mmc_add_host() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0cea529d1afeeb120ae3f22fe353d38049caed5f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mmc: dw_mmc: return the result of mmc_add_host() Check the result of mmc_add_host() and return the value. Signed-off-by: Jaehoon Chung Acked-by: Seungwon Jeon Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 98342213ed21..6da19c15d73b 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1990,7 +1990,9 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) slot->wp_gpio = dw_mci_of_get_wp_gpio(host->dev, slot->id); - mmc_add_host(mmc); + ret = mmc_add_host(mmc); + if (ret) + goto err_setup_bus; #if defined(CONFIG_DEBUG_FS) dw_mci_init_debugfs(slot);