On Fri, 8 Sept 2023 at 15:31, Chunyan Zhang <zhang.lyra@xxxxxxxxx> wrote: > > + Wenchao's gmail > > On Thu, 7 Sept 2023 at 17:54, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: > > > > 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@xxxxxxxxxx> > > --- Reviewed-by: Wenchao Chen <wenchao.chen@xxxxxxxxxx> Thanks, Wenchao > > This is from static analysis and has not been tested. > > --- > > drivers/mmc/host/sdhci-sprd.c | 1 + > > 1 file changed, 1 insertion(+) > > > > 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; > > } > > > > -- > > 2.39.2 > >