diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2023-09-07 12:54:50 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2023-09-26 16:08:05 +0300 |
commit | 168054ca5cf783e07518681fad0904de8dcc6b17 (patch) | |
tree | 0add9acb3bcdbeeb3aef50fea8df2174f5f405e5 /drivers | |
parent | 1202d617e3d04c8d27a14ef30784a698c48170b3 (diff) | |
download | linux-168054ca5cf783e07518681fad0904de8dcc6b17.tar.xz |
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')
-rw-r--r-- | drivers/mmc/host/sdhci-sprd.c | 1 |
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; } |