Message ID | 20120113022034.GA25999@ponder.secretlab.ca (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index 8a9e2ec..11feb2f 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -375,6 +375,9 @@ __irq_reserve_irqs(int irq, unsigned int from, unsigned int cnt) } bitmap_set(allocated_irqs, start, cnt); + mutex_unlock(&sparse_irq_lock); + return start; + err: mutex_unlock(&sparse_irq_lock); return ret; @@ -408,7 +411,8 @@ EXPORT_SYMBOL_GPL(__irq_alloc_descs); */ int irq_reserve_irqs(unsigned int from, unsigned int cnt) { - return __irq_reserve_irqs(from, from, cnt); + int start = __irq_reserve_irqs(from, from, cnt); + return start < 0 ? start : 0; } /**