iio: adc: exynos: Silence warning about regulators during deferred probe
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 28 Feb 2020 09:21:21 +0000 (10:21 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 8 Mar 2020 17:28:44 +0000 (17:28 +0000)
Don't confuse user with meaningless warning about the 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: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/exynos_adc.c

index 2df7d05..22131a6 100644 (file)
@@ -836,8 +836,10 @@ static int exynos_adc_probe(struct platform_device *pdev)
 
        info->vdd = devm_regulator_get(&pdev->dev, "vdd");
        if (IS_ERR(info->vdd)) {
-               dev_err(&pdev->dev, "failed getting regulator, err = %ld\n",
-                                                       PTR_ERR(info->vdd));
+               if (PTR_ERR(info->vdd) != -EPROBE_DEFER)
+                       dev_err(&pdev->dev,
+                               "failed getting regulator, err = %ld\n",
+                               PTR_ERR(info->vdd));
                return PTR_ERR(info->vdd);
        }