aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/dw_mmc.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2020-09-02 21:36:56 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2020-09-07 09:15:56 +0200
commit308d2722f6430839f06572af776f37f7af697134 (patch)
tree6bad104bf366f67e8efdc0daf1bb0a8522ff6173 /drivers/mmc/host/dw_mmc.c
parentmmc: sdhci-tegra: Simplify with dev_err_probe() (diff)
downloadlinux-dev-308d2722f6430839f06572af776f37f7af697134.tar.xz
linux-dev-308d2722f6430839f06572af776f37f7af697134.zip
mmc: dw_mmc: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code, the error value gets printed and real error from dw_mci_parse_dt() is passed further instead of fixed -EINVAL. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20200902193658.20539-10-krzk@kernel.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/dw_mmc.c')
-rw-r--r--drivers/mmc/host/dw_mmc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 0fba940544ca..43c5795691fb 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -3161,12 +3161,9 @@ int dw_mci_probe(struct dw_mci *host)
if (!host->pdata) {
host->pdata = dw_mci_parse_dt(host);
- if (PTR_ERR(host->pdata) == -EPROBE_DEFER) {
- return -EPROBE_DEFER;
- } else if (IS_ERR(host->pdata)) {
- dev_err(host->dev, "platform data not available\n");
- return -EINVAL;
- }
+ if (IS_ERR(host->pdata))
+ return dev_err_probe(host->dev, PTR_ERR(host->pdata),
+ "platform data not available\n");
}
host->biu_clk = devm_clk_get(host->dev, "biu");