From 8335928849729f8e5f10c1497c67260742f7a8cb Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Wed, 30 Jun 2021 06:16:58 +0200 Subject: [PATCH] mmc: core: Only print retune error when we don't check for card removal Skip printing a retune error when we scan for a removed card because we then expect a failed command. Signed-off-by: Wolfram Sang Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20210630041658.7574-1-wsa+renesas@sang-engineering.com [Ulf: Rebased patch] Signed-off-by: Ulf Hansson --- drivers/mmc/core/core.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 84f39a59a28e6..6249c83d616f3 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -936,15 +936,17 @@ int mmc_execute_tuning(struct mmc_card *card) opcode = MMC_SEND_TUNING_BLOCK; err = host->ops->execute_tuning(host, opcode); - - if (err) { - pr_err("%s: tuning execution failed: %d\n", - mmc_hostname(host), err); - } else { + if (!err) { mmc_retune_clear(host); mmc_retune_enable(host); + return 0; } + /* Only print error when we don't check for card removal */ + if (!host->detect_change) + pr_err("%s: tuning execution failed: %d\n", + mmc_hostname(host), err); + return err; } -- 2.30.2