Skip to contentSkip to conversation

mmc: dw-mmc: return the result of mmc_add_host()

PATCH In review Jaehoon Chung 3 participants 3 messages Feb 15, 2013 – Mar 22, 2013

Subsystems (2)
lore
Share & tools
lore

Jaehoon Chung

author maintainer
#0 lore raw

PATCH 1/1 mmc: dw-mmc: return the result of mmc_add_host()

check the result of mmc_add_host() and return the value.

---
 drivers/mmc/host/dw_mmc.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/mmc/host/dw_mmc.c +3 -1
index 60063cc..e481d90 100644
@@ -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);
Signature · 1 line
1.7.9.5
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Jaehoon Chung

check the result of mmc_add_host() and return the value.

Quoted 25 lines
---
 drivers/mmc/host/dw_mmc.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/mmc/host/dw_mmc.c +3 -2
index 60063cc..e481d90 100644
@@ -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);
--

1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html