mirror of
https://github.com/torvalds/linux.git
synced 2026-01-24 23:16:46 +00:00
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
This commit is contained in:
@@ -105,7 +105,7 @@ static int sdw_drv_probe(struct device *dev)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = ida_alloc_max(&slave->bus->slave_ida, SDW_FW_MAX_DEVICES, GFP_KERNEL);
|
||||
ret = ida_alloc_max(&slave->bus->slave_ida, SDW_FW_MAX_DEVICES - 1, GFP_KERNEL);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "Failed to allocated ID: %d\n", ret);
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user