Skip to content

Commit 3f2e4c1

Browse files
charleskeepaxbroonie
authored andcommitted
ASoC: SDCA: Fix off by one error in IRQ bound check
Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/r/[email protected]/ Fixes: b126394 ("ASoC: SDCA: Generic interrupt support") Signed-off-by: Charles Keepax <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent bfd2912 commit 3f2e4c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/soc/sdca/sdca_interrupts.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ int sdca_irq_request(struct device *dev, struct sdca_interrupt_info *info,
262262
{
263263
int ret;
264264

265-
if (sdca_irq < 0 || sdca_irq > SDCA_MAX_INTERRUPTS) {
265+
if (sdca_irq < 0 || sdca_irq >= SDCA_MAX_INTERRUPTS) {
266266
dev_err(dev, "bad irq request: %d\n", sdca_irq);
267267
return -EINVAL;
268268
}

0 commit comments

Comments
 (0)