mmc: fix compilation warning caused by commit 7b9586b50c56956fdf132c19c8ba4cd64449d678
author黄涛 <huangtao@rock-chips.com>
Wed, 17 Sep 2014 09:50:13 +0000 (17:50 +0800)
committer黄涛 <huangtao@rock-chips.com>
Wed, 17 Sep 2014 09:50:13 +0000 (17:50 +0800)
drivers/mmc/core/sd.c

index 1f5850e90aadac7c69fa437a2b31cabafafaa9e7..b03fbd86768f3a0f2d33e07fd8cb19fc88a49900 100755 (executable)
@@ -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;
 }
 
 /*