Skip to content

Commit 079e83b

Browse files
Wolfram Sanggeertu
authored andcommitted
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 <[email protected]> Acked-by: Ulf Hansson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent d3a52bc commit 079e83b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/mmc/host/renesas_sdhi_core.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -918,11 +918,8 @@ int renesas_sdhi_probe(struct platform_device *pdev,
918918
dma_priv = &priv->dma_priv;
919919

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

927924
/*
928925
* Some controllers provide a 2nd clock just to run the internal card

0 commit comments

Comments
 (0)