]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: cs35l56: Fix out-of-bounds in dev_err() in cs35l56_read_onchip_spkid()
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Thu, 30 Apr 2026 10:11:34 +0000 (11:11 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 4 May 2026 13:04:55 +0000 (22:04 +0900)
commit0f9bfb84b3f0fe1406b2555fc11b45283ea21644
treee982b3a33ace4a1bf026690245ec319d4079ce6f
parent0e60d96616640ffcf51b81a87c71e30d92385a93
ASoC: cs35l56: Fix out-of-bounds in dev_err() in cs35l56_read_onchip_spkid()

Remove the incorrect use of onchip_spkid_gpios[i] in the dev_err() after
regmap_read() of CS35L56_GPIO_STATUS1 returns an error.

This dev_err() was incorrectly copy-pasted from one inside the for-loop,
where i was valid. The read of CS35L56_GPIO_STATUS1 isn't for a specific
GPIO register, so the use of onchip_spkid_gpios[i] in the error message is
both irrelevant and out-of-bounds here.

Fixes: 4d1e3e2c404d ("ASoC: cs35l56: Support for reading speaker ID from on-chip GPIOs")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260430101134.2655938-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs35l56-shared.c