Current code does not properly free allocated irqs if request_threaded_irq
returns error, fix it.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
"failed: irq request (IRQ: %d,"
" error :%d)\n",
muic_irq->irq, ret);
-
- for (i = i - 1; i >= 0; i--)
- free_irq(muic_irq->irq, info);
-
goto err_irq;
}
}
return ret;
err_irq:
+ while (--i >= 0)
+ free_irq(pdata->irq_base + muic_irqs[i].irq, info);
err_pdata:
kfree(info);
err_kfree: