Commit 8844aad8 authored by Keith Busch's avatar Keith Busch Committed by Thomas Gleixner
Browse files

genirq: Fix memory leak when calling irq_free_hwirqs()

irq_free_hwirqs() always calls irq_free_descs() with a cnt == 0
which makes it a no-op since the interrupt count to free is
decremented in itself.

Fixes: 7b6ef126

Signed-off-by: default avatarKeith Busch <>
Acked-by: default avatarDavid Rientjes <>

Signed-off-by: default avatarThomas Gleixner <>
parent 4f436603
......@@ -455,9 +455,9 @@ EXPORT_SYMBOL_GPL(irq_alloc_hwirqs);
void irq_free_hwirqs(unsigned int from, int cnt)
int i;
int i, j;
for (i = from; cnt > 0; i++, cnt--) {
for (i = from, j = cnt; j > 0; i++, j--) {
irq_set_status_flags(i, _IRQ_NOREQUEST | _IRQ_NOPROBE);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment