Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SCSI] eata_pio: off by one in eata_pio_detect()

Smatch complains that the reg_IRQ[] array only has MAXIRQ (16) elements
so we are one space beyond the end of the array here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>

authored by

Dan Carpenter and committed by
James Bottomley
127be355 272fd3b2

+1 -1
+1 -1
drivers/scsi/eata_pio.c
··· 919 919 find_pio_EISA(&gc); 920 920 find_pio_ISA(&gc); 921 921 922 - for (i = 0; i <= MAXIRQ; i++) 922 + for (i = 0; i < MAXIRQ; i++) 923 923 if (reg_IRQ[i]) 924 924 request_irq(i, do_eata_pio_int_handler, IRQF_DISABLED, "EATA-PIO", NULL); 925 925