Messages in this thread | | | From | Arnd Bergmann <> | Subject | Re: [PATCH RESEND] misc: Fix irq leak in max8997_muic_probe error path | Date | Mon, 26 Mar 2012 08:17:28 +0000 |
| |
On Monday 26 March 2012, Axel Lin wrote: > > 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>
It took me a while to see why this is correct.
Acked-by: Arnd Bergmann <arnd@arndb.de>
Note: It would be nicer to move the dev_err() down into the error path as well and also fix the message to print the correct irq number, but your patch is the important part.
Note to the driver maintainers: It looks like there is a race in the max8997_muic_irq_handler() function assigning the info->irq member when multiple interrupts come in at the same time. Also, calling sched_work from a threaded interrupt handler is pointless. I would suggest fixing both of these by removing the work function and calling moving its contents into the interrupt handler directly. Please correct me if I am missing somehting here.
Arnd
| |