projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d3aed7
)
Staging: comedi: reorder check in pcmmio_attach()
author
Dan Carpenter
<error27@gmail.com>
Mon, 28 Dec 2009 16:59:01 +0000
(18:59 +0200)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Thu, 4 Mar 2010 00:42:38 +0000
(16:42 -0800)
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 <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/drivers/pcmmio.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/staging/comedi/drivers/pcmmio.c
b/drivers/staging/comedi/drivers/pcmmio.c
index 35ba93989a36e1c55854280214f668bfbddbdc62..6ca4105610c182b4e159aaf3d66a012f15ce1c7b 100644
(file)
--- 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) ");