Browse Source

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 <jh80.chung@samsung.com>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Jaehoon Chung 12 years ago
parent
commit
0cea529d1a
1 changed files with 3 additions and 1 deletions
  1. 3 1
      drivers/mmc/host/dw_mmc.c

+ 3 - 1
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);