Commit 71f277a7 authored by Ulf Hansson's avatar Ulf Hansson Committed by Rafael J. Wysocki

spi: Respect all error codes from dev_pm_domain_attach()

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: default avatarUlf Hansson <ulf.hansson@linaro.org>
Acked-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 29ffcc88
...@@ -356,11 +356,12 @@ static int spi_drv_probe(struct device *dev) ...@@ -356,11 +356,12 @@ static int spi_drv_probe(struct device *dev)
} }
ret = dev_pm_domain_attach(dev, true); ret = dev_pm_domain_attach(dev, true);
if (ret != -EPROBE_DEFER) { if (ret)
ret = sdrv->probe(spi); return ret;
if (ret)
dev_pm_domain_detach(dev, true); ret = sdrv->probe(spi);
} if (ret)
dev_pm_domain_detach(dev, true);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment