summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2021-11-10 20:16:08 +0100
committerGeert Uytterhoeven <geert+renesas@glider.be>2021-11-19 11:32:39 +0100
commit079e83b958a3c3d9c84e24b28478d57adc1cd7fe (patch)
tree57d2815752efcf7e7227eba0e366844649994ce0 /drivers/mmc
parentclk: renesas: rcar-gen3: Remove outdated SD_SKIP_FIRST (diff)
downloadlinux-079e83b958a3c3d9c84e24b28478d57adc1cd7fe.tar.xz
linux-079e83b958a3c3d9c84e24b28478d57adc1cd7fe.zip
mmc: renesas_sdhi: Use dev_err_probe when getting clock fails
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>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/renesas_sdhi_core.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index 31e232bcb5e8..7f842fd306a3 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -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