mmc: jz4740: Simplify with dev_err_probe()
authorKrzysztof Kozlowski <krzk@kernel.org>
Wed, 2 Sep 2020 19:36:51 +0000 (21:36 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 7 Sep 2020 07:15:31 +0000 (09:15 +0200)
Common pattern of handling deferred probe can be simplified with
dev_err_probe().  Less code and the error value gets printed.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200902193658.20539-5-krzk@kernel.org
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/jz4740_mmc.c

index 81d71010b4742d6b8bfdf6287471903428a714e8..fea0a42010c71046a9bc3b2eef0306b392e5b461 100644 (file)
@@ -991,9 +991,7 @@ static int jz4740_mmc_probe(struct platform_device* pdev)
 
        ret = mmc_of_parse(mmc);
        if (ret) {
-               if (ret != -EPROBE_DEFER)
-                       dev_err(&pdev->dev,
-                               "could not parse device properties: %d\n", ret);
+               dev_err_probe(&pdev->dev, ret, "could not parse device properties\n");
                goto err_free_host;
        }