lkml.org 
[lkml]   [2012]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH RESEND] misc: Fix irq leak in max8997_muic_probe error path
Date
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



\
 
 \ /
  Last update: 2012-03-26 10:43    [W:0.061 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site