mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 23:33:01 -04:00
ASoC: SDCA: Fix off by one error in IRQ bound check
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202507150415.M1tCgi3p-lkp@intel.com/
Fixes: b126394d9e ("ASoC: SDCA: Generic interrupt support")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250715151723.2964336-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
bfd291279f
commit
3f2e4c1192
@@ -262,7 +262,7 @@ int sdca_irq_request(struct device *dev, struct sdca_interrupt_info *info,
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (sdca_irq < 0 || sdca_irq > SDCA_MAX_INTERRUPTS) {
|
||||
if (sdca_irq < 0 || sdca_irq >= SDCA_MAX_INTERRUPTS) {
|
||||
dev_err(dev, "bad irq request: %d\n", sdca_irq);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user