Skip to content

Commit

Permalink
amba: Respect all error codes from dev_pm_domain_attach()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
storulf authored and rafaeljw committed May 14, 2018
1 parent 919b730 commit d21bc89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/amba/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit d21bc89

Please sign in to comment.