From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [PATCH] mmc: sdhci-cadence: Fix a loop in sdhci_cdns_set_tune_val()
Date: Tue, 24 Apr 2018 13:26:06 +0000 [thread overview]
Message-ID: <20180424132606.GA10167@mwanda> (raw)
We were supposed to go through this loop twice but there is a missing if
statement so it only loops once.
Fixes: 213fae74318b ("mmc: sdhci-cadence: send tune request twice to work around errata")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c
index bc30d1637246..7a343b87b5e5 100644
--- a/drivers/mmc/host/sdhci-cadence.c
+++ b/drivers/mmc/host/sdhci-cadence.c
@@ -274,8 +274,8 @@ static int sdhci_cdns_set_tune_val(struct sdhci_host *host, unsigned int val)
ret = readl_poll_timeout(reg, tmp,
!(tmp & SDHCI_CDNS_HRS06_TUNE_UP),
0, 1);
-
- return ret;
+ if (ret)
+ return ret;
}
return 0;
next reply other threads:[~2018-04-24 13:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-24 13:26 Dan Carpenter [this message]
2018-04-25 12:37 ` [PATCH] mmc: sdhci-cadence: Fix a loop in sdhci_cdns_set_tune_val() Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180424132606.GA10167@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.