Skip to content

Commit 127be35

Browse files
Dan CarpenterJames Bottomley
authored andcommitted
[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>
1 parent 272fd3b commit 127be35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/eata_pio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ static int eata_pio_detect(struct scsi_host_template *tpnt)
919919
find_pio_EISA(&gc);
920920
find_pio_ISA(&gc);
921921

922-
for (i = 0; i <= MAXIRQ; i++)
922+
for (i = 0; i < MAXIRQ; i++)
923923
if (reg_IRQ[i])
924924
request_irq(i, do_eata_pio_int_handler, IRQF_DISABLED, "EATA-PIO", NULL);
925925

0 commit comments

Comments
 (0)