mmc: fix compilation warning caused by commit 7b9586b50c

This commit is contained in:
黄涛
2014-09-17 17:50:13 +08:00
parent c2370f8872
commit ac48b4bb1e

View File

@@ -1116,13 +1116,12 @@ static void mmc_sd_detect(struct mmc_host *host)
}
}
/*
* Callback for suspend
*/
static int mmc_sd_suspend(struct mmc_host *host)
{
int err;
int err = 0;
BUG_ON(!host);
BUG_ON(!host->card);
@@ -1130,19 +1129,19 @@ static int mmc_sd_suspend(struct mmc_host *host)
mmc_claim_host(host);
if (mmc_card_suspended(host->card))
goto out;
if (!mmc_host_is_spi(host))
err = mmc_deselect_cards(host);
goto out;
if (!mmc_host_is_spi(host))
err = mmc_deselect_cards(host);
host->card->state &= ~MMC_STATE_HIGHSPEED;
if (!err) {
mmc_power_off(host);
mmc_card_set_suspended(host->card);
}
host->card->state &= ~MMC_STATE_HIGHSPEED;
if (!err) {
mmc_power_off(host);
mmc_card_set_suspended(host->card);
}
out:
mmc_release_host(host);
return err;
mmc_release_host(host);
return err;
}
/*