提交 29ffcc88 编写于 作者: U Ulf Hansson 提交者: Rafael J. Wysocki

soundwire: 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: NUlf Hansson <ulf.hansson@linaro.org>
Acked-by: NVinod Koul <vkoul@kernel.org>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 d23fc022
...@@ -83,17 +83,16 @@ static int sdw_drv_probe(struct device *dev) ...@@ -83,17 +83,16 @@ static int sdw_drv_probe(struct device *dev)
* attach to power domain but don't turn on (last arg) * attach to power domain but don't turn on (last arg)
*/ */
ret = dev_pm_domain_attach(dev, false); ret = dev_pm_domain_attach(dev, false);
if (ret != -EPROBE_DEFER) {
ret = drv->probe(slave, id);
if (ret) {
dev_err(dev, "Probe of %s failed: %d\n", drv->name, ret);
dev_pm_domain_detach(dev, false);
}
}
if (ret) if (ret)
return ret; return ret;
ret = drv->probe(slave, id);
if (ret) {
dev_err(dev, "Probe of %s failed: %d\n", drv->name, ret);
dev_pm_domain_detach(dev, false);
return ret;
}
/* device is probed so let's read the properties now */ /* device is probed so let's read the properties now */
if (slave->ops && slave->ops->read_prop) if (slave->ops && slave->ops->read_prop)
slave->ops->read_prop(slave); slave->ops->read_prop(slave);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册