From: Dan Carpenter Date: Fri, 23 Aug 2013 12:11:31 +0000 (+0300) Subject: [SCSI] eata_pio: off by one in eata_pio_detect() X-Git-Tag: next-20130912~204^2~39 X-Git-Url: https://git.karo-electronics.de/?p=karo-tx-linux.git;a=commitdiff_plain;h=127be355285d14b483da0478a33302a680204144 [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 Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/eata_pio.c b/drivers/scsi/eata_pio.c index 356def44ce58..1663173cdb91 100644 --- a/drivers/scsi/eata_pio.c +++ b/drivers/scsi/eata_pio.c @@ -919,7 +919,7 @@ static int eata_pio_detect(struct scsi_host_template *tpnt) find_pio_EISA(&gc); find_pio_ISA(&gc); - for (i = 0; i <= MAXIRQ; i++) + for (i = 0; i < MAXIRQ; i++) if (reg_IRQ[i]) request_irq(i, do_eata_pio_int_handler, IRQF_DISABLED, "EATA-PIO", NULL);