From: Linus Walleij <[email protected]>
We were not freeing the irq properly in the error path in
the AB8500 driver.
Cc: Mark Brown <[email protected]>
Signed-off-by: Maxime Coquelin <[email protected]>
Signed-off-by: Alex Macro <[email protected]>
Signed-off-by: Michel Jaouen <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
---
drivers/mfd/ab8500-core.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
index 53e2a80..bf823d2 100644
--- a/drivers/mfd/ab8500-core.c
+++ b/drivers/mfd/ab8500-core.c
@@ -956,9 +956,10 @@ int __devinit ab8500_init(struct ab8500 *ab8500)
return ret;
out_freeirq:
- if (ab8500->irq_base) {
+ if (ab8500->irq_base)
free_irq(ab8500->irq, ab8500);
out_removeirq:
+ if (ab8500->irq_base)
ab8500_irq_remove(ab8500);
}
return ret;
--
1.7.8
Hi Linus,
On 02/01/2012 05:09 PM, Linus WALLEIJ wrote:
> From: Linus Walleij<[email protected]>
>
> We were not freeing the irq properly in the error path in
> the AB8500 driver.
>
> Cc: Mark Brown<[email protected]>
> Signed-off-by: Maxime Coquelin<[email protected]>
> Signed-off-by: Alex Macro<[email protected]>
> Signed-off-by: Michel Jaouen<[email protected]>
> Signed-off-by: Linus Walleij<[email protected]>
> ---
> drivers/mfd/ab8500-core.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mfd/ab8500-core.c b/drivers/mfd/ab8500-core.c
> index 53e2a80..bf823d2 100644
> --- a/drivers/mfd/ab8500-core.c
> +++ b/drivers/mfd/ab8500-core.c
> @@ -956,9 +956,10 @@ int __devinit ab8500_init(struct ab8500 *ab8500)
> return ret;
>
> out_freeirq:
> - if (ab8500->irq_base) {
> + if (ab8500->irq_base)
> free_irq(ab8500->irq, ab8500);
> out_removeirq:
> + if (ab8500->irq_base)
> ab8500_irq_remove(ab8500);
> }
Shouldn't the above brace to be removed?
> return ret;
Regards,
Maxime
On Wed, Feb 1, 2012 at 5:24 PM, Maxime Coquelin
<[email protected]> wrote:
> On 02/01/2012 05:09 PM, Linus WALLEIJ wrote:
>> --- a/drivers/mfd/ab8500-core.c
>> +++ b/drivers/mfd/ab8500-core.c
>> @@ -956,9 +956,10 @@ int __devinit ab8500_init(struct ab8500 *ab8500)
>> ? ? ? ?return ret;
>>
>> ?out_freeirq:
>> - ? ? ? if (ab8500->irq_base) {
>> + ? ? ? if (ab8500->irq_base)
>> ? ? ? ? ? ? ? ?free_irq(ab8500->irq, ab8500);
>> ?out_removeirq:
>> + ? ? ? if (ab8500->irq_base)
>> ? ? ? ? ? ? ? ?ab8500_irq_remove(ab8500);
>> ? ? ? ?}
>
> Shouldn't the above brace to be removed?
Yes of course, thanks for spotting this! Fixed it in my patch queue.
Yours,
Linus Walleij