Skip to content

Commit 6aa6f8c

Browse files
committed
Merge tag 'soundwire-6.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire
Pull soundwire fix from Vinod Koul: - Fix for irq domain creation race in the core * tag 'soundwire-6.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: bus: Fix race on the creation of the IRQ domain
2 parents e72e784 + fd15594 commit 6aa6f8c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/soundwire/bus.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ int sdw_bus_master_add(struct sdw_bus *bus, struct device *parent,
122122
set_bit(SDW_GROUP13_DEV_NUM, bus->assigned);
123123
set_bit(SDW_MASTER_DEV_NUM, bus->assigned);
124124

125+
ret = sdw_irq_create(bus, fwnode);
126+
if (ret)
127+
return ret;
128+
125129
/*
126130
* SDW is an enumerable bus, but devices can be powered off. So,
127131
* they won't be able to report as present.
@@ -138,6 +142,7 @@ int sdw_bus_master_add(struct sdw_bus *bus, struct device *parent,
138142

139143
if (ret < 0) {
140144
dev_err(bus->dev, "Finding slaves failed:%d\n", ret);
145+
sdw_irq_delete(bus);
141146
return ret;
142147
}
143148

@@ -156,10 +161,6 @@ int sdw_bus_master_add(struct sdw_bus *bus, struct device *parent,
156161
bus->params.curr_bank = SDW_BANK0;
157162
bus->params.next_bank = SDW_BANK1;
158163

159-
ret = sdw_irq_create(bus, fwnode);
160-
if (ret)
161-
return ret;
162-
163164
return 0;
164165
}
165166
EXPORT_SYMBOL(sdw_bus_master_add);

0 commit comments

Comments
 (0)