amba: Respect all error codes from dev_pm_domain_attach()
authorUlf Hansson <ulf.hansson@linaro.org>
Thu, 26 Apr 2018 08:53:05 +0000 (10:53 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 14 May 2018 20:58:44 +0000 (22:58 +0200)
The limitation of being able to check only for -EPROBE_DEFER from
dev_pm_domain_attach() has been removed. Hence let's respect all error
codes and bail out accordingly.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/amba/bus.c

index 4a3ac31c07d0ee49615a00af001e49ff8e30f005..b0160b5c56084736ca18d367686fc4c8fc4ee5d7 100644 (file)
@@ -248,7 +248,7 @@ static int amba_probe(struct device *dev)
                        break;
 
                ret = dev_pm_domain_attach(dev, true);
-               if (ret == -EPROBE_DEFER)
+               if (ret)
                        break;
 
                ret = amba_get_enable_pclk(pcdev);
@@ -375,7 +375,7 @@ static int amba_device_try_add(struct amba_device *dev, struct resource *parent)
        }
 
        ret = dev_pm_domain_attach(&dev->dev, true);
-       if (ret == -EPROBE_DEFER) {
+       if (ret) {
                iounmap(tmp);
                goto err_release;
        }