lkml.org 
[lkml]   [2011]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: gpio: pca953x: prevent freeing IRQ 0 on probe error
On Thursday, March 31, 2011 1:49 PM, Grant Likely wrote:
> On Fri, Mar 25, 2011 at 03:02:54PM -0700, H Hartley Sweeten wrote:
>> If CONFIG_GPIO_PCA953X_IRQ is enabled and an error occurs in the probe
>> before pca953x_irq_setup() is called chip->client->irq will be 0 due to
>> the kmalloc. pca953x_irq_teardown() will then try to free_irq(0, chip)
>> which will produce a:
>>
>> WARN(1, "Trying to free already-free IRQ %d\n", irq);
>>
>> Add an error path to prevent this.
>>
>> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
>> Cc: Grant Likely <grant.likely@secretlab.ca>
>
> Thanks for catching this Hartley.
>
> Ben also submitted a patch for this and I ended up looking at his patch
> first, so that is what's applied. :-)

Not a problem. Thanks!
Hartley

\
 
 \ /
  Last update: 2011-03-31 23:23    [W:0.713 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site