Skip to content

Commit 56bc8a1

Browse files
committed
Merge tag 'soundwire-6.19-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire
Pull soundwire fix from Vinod Koul: - Single off-by-one fix for allocating slave id * tag 'soundwire-6.19-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: bus: fix off-by-one when allocating slave IDs
2 parents 2798396 + 12d4fd9 commit 56bc8a1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/soundwire/bus_type.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static int sdw_drv_probe(struct device *dev)
105105
if (ret)
106106
return ret;
107107

108-
ret = ida_alloc_max(&slave->bus->slave_ida, SDW_FW_MAX_DEVICES, GFP_KERNEL);
108+
ret = ida_alloc_max(&slave->bus->slave_ida, SDW_FW_MAX_DEVICES - 1, GFP_KERNEL);
109109
if (ret < 0) {
110110
dev_err(dev, "Failed to allocated ID: %d\n", ret);
111111
return ret;

0 commit comments

Comments
 (0)