From efbbfc232196c5f035e88aa1c7eb92efa84b4083 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Mon, 4 Jan 2010 11:39:28 +0000 Subject: [PATCH] pcmmio: reorder check for second irq in pcmmio_attach() to avoid reading past end of array. (Staging patch from Dan Carpenter.) --- comedi/drivers/pcmmio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) "); -- 2.26.2