Skip to content

Commit 29ffcc8

Browse files
storulfrafaeljw
authored andcommitted
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: Ulf Hansson <[email protected]> Acked-by: Vinod Koul <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent d23fc02 commit 29ffcc8

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

drivers/soundwire/bus_type.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,16 @@ static int sdw_drv_probe(struct device *dev)
8383
* attach to power domain but don't turn on (last arg)
8484
*/
8585
ret = dev_pm_domain_attach(dev, false);
86-
if (ret != -EPROBE_DEFER) {
87-
ret = drv->probe(slave, id);
88-
if (ret) {
89-
dev_err(dev, "Probe of %s failed: %d\n", drv->name, ret);
90-
dev_pm_domain_detach(dev, false);
91-
}
92-
}
93-
9486
if (ret)
9587
return ret;
9688

89+
ret = drv->probe(slave, id);
90+
if (ret) {
91+
dev_err(dev, "Probe of %s failed: %d\n", drv->name, ret);
92+
dev_pm_domain_detach(dev, false);
93+
return ret;
94+
}
95+
9796
/* device is probed so let's read the properties now */
9897
if (slave->ops && slave->ops->read_prop)
9998
slave->ops->read_prop(slave);

0 commit comments

Comments
 (0)