diff options
| author | Dan Carpenter <[email protected]> | 2009-12-28 18:59:01 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2010-03-03 16:42:38 -0800 |
| commit | 4b2ba24399cfcd7c80a20cd3bbedc5df0ebd4345 (patch) | |
| tree | e3662756966b3b775f6172fb985512b83073c0d7 | |
| parent | 5d3aed742498ffe5692e3f974f3f7ea0e99a93bb (diff) | |
Staging: comedi: reorder check in pcmmio_attach()
The check for dio_num_asics is used to determine if there is more than 1 irq.
If it is false then irq[1] is past the end of the array.
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
| -rw-r--r-- | drivers/staging/comedi/drivers/pcmmio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c index 35ba93989a36..6ca4105610c1 100644 --- a/drivers/staging/comedi/drivers/pcmmio.c +++ b/drivers/staging/comedi/drivers/pcmmio.c @@ -550,7 +550,7 @@ static int pcmmio_attach(struct comedi_device *dev, struct 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) "); |