pcmmio: reorder check for second irq in pcmmio_attach() to avoid reading
authorIan Abbott <abbotti@mev.co.uk>
Mon, 4 Jan 2010 11:39:28 +0000 (11:39 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Mon, 4 Jan 2010 11:39:28 +0000 (11:39 +0000)
past end of array.
(Staging patch from Dan Carpenter.)

comedi/drivers/pcmmio.c

index 581a3178336a7c38af376ce2f41d2625f0282a63..477eec788d17240f1bca245f9de551e47edfd500 100644 (file)
@@ -507,7 +507,7 @@ static int pcmmio_attach(comedi_device * dev, comedi_devconfig * it)
 
        if (irq[0]) {
                printk("irq: %u ", irq[0]);
-               if (irq[1] && thisboard->dio_num_asics == 2)
+               if (thisboard->dio_num_asics == 2 && irq[1])
                        printk("second ASIC irq: %u ", irq[1]);
        } else {
                printk("(IRQ mode disabled) ");