Skip to content

Commit

Permalink
mmc: renesas_sdhi: Use dev_err_probe when getting clock fails
Browse files Browse the repository at this point in the history
This is to improve deferred probe in this driver and to keep consistent
with an up-to-date handling of a soon to be added second clock.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20211110191610.5664-20-wsa+renesas@sang-engineering.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
  • Loading branch information
Wolfram Sang authored and Geert Uytterhoeven committed Nov 19, 2021
1 parent d3a52bc commit 079e83b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/mmc/host/renesas_sdhi_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -918,11 +918,8 @@ int renesas_sdhi_probe(struct platform_device *pdev,
dma_priv = &priv->dma_priv;

priv->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(priv->clk)) {
ret = PTR_ERR(priv->clk);
dev_err(&pdev->dev, "cannot get clock: %d\n", ret);
return ret;
}
if (IS_ERR(priv->clk))
return dev_err_probe(&pdev->dev, PTR_ERR(priv->clk), "cannot get clock");

/*
* Some controllers provide a 2nd clock just to run the internal card
Expand Down

0 comments on commit 079e83b

Please sign in to comment.