git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
genirq: Ensure we locate the passed IRQ in irq_alloc_descs()
[pandora-kernel.git]
/
kernel
/
irq
/
irqdesc.c
diff --git
a/kernel/irq/irqdesc.c
b/kernel/irq/irqdesc.c
index
c7ddc87
..
4c60a50
100644
(file)
--- a/
kernel/irq/irqdesc.c
+++ b/
kernel/irq/irqdesc.c
@@
-344,6
+344,12
@@
irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node)
if (!cnt)
return -EINVAL;
+ if (irq >= 0) {
+ if (from > irq)
+ return -EINVAL;
+ from = irq;
+ }
+
mutex_lock(&sparse_irq_lock);
start = bitmap_find_next_zero_area(allocated_irqs, IRQ_BITMAP_BITS,