Linux MultiMedia Card development
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-sprd: Fix error code in sdhci_sprd_tuning()
@ 2023-09-07  9:54 Dan Carpenter
  2023-09-08  7:30 ` Chunyan Zhang
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Dan Carpenter @ 2023-09-07  9:54 UTC (permalink / raw)
  To: Wenchao Chen
  Cc: Adrian Hunter, Ulf Hansson, Orson Zhai, Baolin Wang,
	Chunyan Zhang, linux-mmc, kernel-janitors

Return an error code if sdhci_sprd_get_best_clk_sample() fails.
Currently, it returns success.

Fixes: d83d251bf3c2 ("mmc: sdhci-sprd: Add SD HS mode online tuning")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
This is from static analysis and has not been tested.
---
 drivers/mmc/host/sdhci-sprd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
index 649ae075e229..6b84ba27e6ab 100644
--- a/drivers/mmc/host/sdhci-sprd.c
+++ b/drivers/mmc/host/sdhci-sprd.c
@@ -644,6 +644,7 @@ static int sdhci_sprd_tuning(struct mmc_host *mmc, struct mmc_card *card,
 	best_clk_sample = sdhci_sprd_get_best_clk_sample(mmc, value);
 	if (best_clk_sample < 0) {
 		dev_err(mmc_dev(host->mmc), "all tuning phase fail!\n");
+		err = best_clk_sample;
 		goto out;
 	}
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-09-14 14:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-07  9:54 [PATCH] mmc: sdhci-sprd: Fix error code in sdhci_sprd_tuning() Dan Carpenter
2023-09-08  7:30 ` Chunyan Zhang
2023-09-08  8:37   ` Wenchao Chen
2023-09-12  1:16 ` Baolin Wang
2023-09-12  9:41 ` Adrian Hunter
2023-09-14 14:47 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox