mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 01:54:09 +08:00
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: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
29ffcc88f2
commit
71f277a7bf
@ -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)
|
||||||
|
return ret;
|
||||||
|
|
||||||
ret = sdrv->probe(spi);
|
ret = sdrv->probe(spi);
|
||||||
if (ret)
|
if (ret)
|
||||||
dev_pm_domain_detach(dev, true);
|
dev_pm_domain_detach(dev, true);
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user