aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorDan Carpenter2023-09-07 12:54:50 +0300
committerUlf Hansson2023-09-26 15:08:05 +0200
commit168054ca5cf783e07518681fad0904de8dcc6b17 (patch)
tree0add9acb3bcdbeeb3aef50fea8df2174f5f405e5 /drivers/mmc
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 <dan.carpenter@linaro.org> Reviewed-by: Wenchao Chen <wenchao.chen@unisoc.com> Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/a8af0a08-8405-43cc-bd83-85ff25f572ca@moroto.mountain Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-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;
}