aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2023-09-07 12:54:50 +0300
committerUlf Hansson <[email protected]>2023-09-26 15:08:05 +0200
commit168054ca5cf783e07518681fad0904de8dcc6b17 (patch)
tree0add9acb3bcdbeeb3aef50fea8df2174f5f405e5
parent1202d617e3d04c8d27a14ef30784a698c48170b3 (diff)
mmc: sdhci-sprd: Fix error code in sdhci_sprd_tuning()
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 <[email protected]> Reviewed-by: Wenchao Chen <[email protected]> Reviewed-by: Baolin Wang <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
-rw-r--r--drivers/mmc/host/sdhci-sprd.c1
1 files changed, 1 insertions, 0 deletions
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;
}