summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>2026-07-01 20:30:05 +0100
committerVinod Koul <vkoul@kernel.org>2026-07-02 21:56:49 +0530
commit6ccec91c3535b07310e12d32fe9c67ff8d31d965 (patch)
tree04f2e8e9b4d627096efb7b097aef94762e5c7d11 /include/linux
parentb496bb56b418788aa8625950e94206abe7282e18 (diff)
soundwire: qcom: Fix port exhaustion check in stream_alloc_ports
find_first_zero_bit(mask, n) returns n (not n+1) when all bits are set, so the guard `pn > maxport` is never true on exhaustion. The driver would silently call set_bit(maxport, port_mask) and assign the out-of-range port instead of returning -EBUSY. Fix the comparison to `pn >= maxport`. Fixes: 02efb49aa805 ("soundwire: qcom: add support for SoundWire controller") Reported-by: sashiko-bot <sashiko-bot@kernel.org> Assisted-by: Claude Sonnet 4.6 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260701193006.4113-2-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions