From: Ian Abbott Date: Mon, 4 Jan 2010 11:39:28 +0000 (+0000) Subject: pcmmio: reorder check for second irq in pcmmio_attach() to avoid reading X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=efbbfc232196c5f035e88aa1c7eb92efa84b4083;p=comedi.git pcmmio: reorder check for second irq in pcmmio_attach() to avoid reading past end of array. (Staging patch from Dan Carpenter.) --- diff --git a/comedi/drivers/pcmmio.c b/comedi/drivers/pcmmio.c index 581a3178..477eec78 100644 --- a/comedi/drivers/pcmmio.c +++ b/comedi/drivers/pcmmio.c @@ -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) ");