Skip to content

Commit

Permalink
mmc: sdhci-sprd: Fix error code in sdhci_sprd_tuning()
Browse files Browse the repository at this point in the history
Return an error code if sdhci_sprd_get_best_clk_sample() fails.
Currently, it returns success.

Fixes: d83d251 ("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>
  • Loading branch information
Dan Carpenter authored and Ulf Hansson committed Sep 26, 2023
1 parent 1202d61 commit 168054c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mmc/host/sdhci-sprd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 168054c

Please sign in to comment.