summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-06-04 11:40:33 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-06-04 11:40:33 +0300
commit5b550c92d704ad4b5f1081c62d515a137d1c4bd2 (patch)
tree16673522bc7fc5dfdb4502395191548599c0d86a /drivers/spi
parentf1c7d00c15314c9e51a7b6ed51b5b23b384e2341 (diff)
parent49072f97d4a3f8f44fe9677e3df94082b29b7e6f (diff)
downloadlinux-5b550c92d704ad4b5f1081c62d515a137d1c4bd2.tar.xz
Merge branch 'pm-domains'
* pm-domains: PM / domains: Improve wording of dev_pm_domain_attach() comment PM / Domains: Don't return -EEXIST at attach when PM domain exists spi: Respect all error codes from dev_pm_domain_attach() soundwire: Respect all error codes from dev_pm_domain_attach() mmc: sdio: Respect all error codes from dev_pm_domain_attach() i2c: Respect all error codes from dev_pm_domain_attach() driver core: Respect all error codes from dev_pm_domain_attach() amba: Respect all error codes from dev_pm_domain_attach() PM / Domains: Allow a better error handling of dev_pm_domain_attach() PM / Domains: Check for existing PM domain in dev_pm_domain_attach() PM / Domains: Drop redundant code in genpd while attaching devices PM / Domains: Drop comment in genpd about legacy Samsung DT binding PM / Domains: Fix error path during attach in genpd
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 7b213faa0a2b..eeab67f50580 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -356,11 +356,12 @@ static int spi_drv_probe(struct device *dev)
}
ret = dev_pm_domain_attach(dev, true);
- if (ret != -EPROBE_DEFER) {
- ret = sdrv->probe(spi);
- if (ret)
- dev_pm_domain_detach(dev, true);
- }
+ if (ret)
+ return ret;
+
+ ret = sdrv->probe(spi);
+ if (ret)
+ dev_pm_domain_detach(dev, true);
return ret;
}