drm/exynos: dsi: propagate error value and silence meaningless warning
authorMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 27 Feb 2020 07:06:37 +0000 (08:06 +0100)
committerInki Dae <inki.dae@samsung.com>
Mon, 2 Mar 2020 04:02:27 +0000 (13:02 +0900)
Properly propagate error value from devm_regulator_bulk_get() and don't
confuse user with meaningless warning about failure in getting regulators
in case of deferred probe.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_dsi.c

index 33628d85edad9102cf2bf220b7b78fc645752882..3f6fcd453d33a3afabb7986463123b6e58d6e45e 100644 (file)
@@ -1773,8 +1773,9 @@ static int exynos_dsi_probe(struct platform_device *pdev)
        ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(dsi->supplies),
                                      dsi->supplies);
        if (ret) {
-               dev_info(dev, "failed to get regulators: %d\n", ret);
-               return -EPROBE_DEFER;
+               if (ret != -EPROBE_DEFER)
+                       dev_info(dev, "failed to get regulators: %d\n", ret);
+               return ret;
        }
 
        dsi->clks = devm_kcalloc(dev,