Skip to content

Commit 168054c

Browse files
Dan CarpenterUlf Hansson
authored andcommitted
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: 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>
1 parent 1202d61 commit 168054c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/mmc/host/sdhci-sprd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,7 @@ static int sdhci_sprd_tuning(struct mmc_host *mmc, struct mmc_card *card,
644644
best_clk_sample = sdhci_sprd_get_best_clk_sample(mmc, value);
645645
if (best_clk_sample < 0) {
646646
dev_err(mmc_dev(host->mmc), "all tuning phase fail!\n");
647+
err = best_clk_sample;
647648
goto out;
648649
}
649650

0 commit comments

Comments
 (0)