]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mmc: core: Add error message when switching fails in mmc_select_hs()
authorJungseung Lee <js07.lee@samsung.com>
Wed, 24 Aug 2016 10:34:09 +0000 (19:34 +0900)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 26 Sep 2016 19:31:14 +0000 (21:31 +0200)
The switch failure message in mmc_select_timing() had been removed
since that is invalid: commit 0400ed0a083a ("mmc: core: remove the
invalid message in mmc_select_timing")

Now, in the case when mmc_select_hs() return error in mmc_select_timing(),
there is nothing to print failure message.
Let's make for mmc_select_hs() print message itself in the failure case.

Signed-off-by: Jungseung Lee <js07.lee@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/mmc.c

index f2d185cf8a8ba52e8f68651c2c517e55313c9d57..3486bc7fbb64a67a4cf1156c2ac7652541ef60bb 100644 (file)
@@ -1029,6 +1029,10 @@ static int mmc_select_hs(struct mmc_card *card)
                err = mmc_switch_status(card);
        }
 
+       if (err)
+               pr_warn("%s: switch to high-speed failed, err:%d\n",
+                       mmc_hostname(card->host), err);
+
        return err;
 }
 
@@ -1265,11 +1269,8 @@ static int mmc_select_hs400es(struct mmc_card *card)
 
        /* Switch card to HS mode */
        err = mmc_select_hs(card);
-       if (err) {
-               pr_err("%s: switch to high-speed failed, err:%d\n",
-                       mmc_hostname(host), err);
+       if (err)
                goto out_err;
-       }
 
        err = mmc_switch_status(card);
        if (err)