soundwire: qcom: fix device status array range
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Fri, 8 Jul 2022 10:47:47 +0000 (11:47 +0100)
committerVinod Koul <vkoul@kernel.org>
Thu, 1 Sep 2022 08:56:44 +0000 (14:26 +0530)
commit4ef3f2aff1267bfa6d5a90c42a30b927b8aa239b
tree39ecbef959f7dcd4683ed71a610baed605ba65d3
parentc6e50787889c8d55db65c769dccee98c7fcd1732
soundwire: qcom: fix device status array range

This patch updates device status array range from 11 to 12 as we will
be reading status from device number 0 to device number 11 inclusive.

Without this patch we can potentially access status array out of range
during auto-enumeration.

Fixes: aa1262ca6695 ("soundwire: qcom: Check device status before reading devid")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220708104747.8722-1-srinivas.kandagatla@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/qcom.c