diff options
Diffstat (limited to 'drivers/mmc/core/mmc.c')
-rw-r--r-- | drivers/mmc/core/mmc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 479b84a00bd7..c793fda27321 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c | |||
@@ -2004,14 +2004,13 @@ int mmc_attach_mmc(struct mmc_host *host) | |||
2004 | 2004 | ||
2005 | mmc_release_host(host); | 2005 | mmc_release_host(host); |
2006 | err = mmc_add_card(host->card); | 2006 | err = mmc_add_card(host->card); |
2007 | mmc_claim_host(host); | ||
2008 | if (err) | 2007 | if (err) |
2009 | goto remove_card; | 2008 | goto remove_card; |
2010 | 2009 | ||
2010 | mmc_claim_host(host); | ||
2011 | return 0; | 2011 | return 0; |
2012 | 2012 | ||
2013 | remove_card: | 2013 | remove_card: |
2014 | mmc_release_host(host); | ||
2015 | mmc_remove_card(host->card); | 2014 | mmc_remove_card(host->card); |
2016 | mmc_claim_host(host); | 2015 | mmc_claim_host(host); |
2017 | host->card = NULL; | 2016 | host->card = NULL; |