From: 黄涛 Date: Wed, 17 Sep 2014 09:50:13 +0000 (+0800) Subject: mmc: fix compilation warning caused by commit 7b9586b50c56956fdf132c19c8ba4cd64449d678 X-Git-Tag: firefly_0821_release~4678 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ac48b4bb1e77af5a4e83d164d7caf7ff1490ff94;p=firefly-linux-kernel-4.4.55.git mmc: fix compilation warning caused by commit 7b9586b50c56956fdf132c19c8ba4cd64449d678 --- diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 1f5850e90aad..b03fbd86768f 100755 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -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); - - 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; + 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); + } +out: + mmc_release_host(host); + return err; } /*