Input: twl4030-pwrbutton - fix a leak of the IRQ during init failure
authorAxel Lin <axel.lin@gmail.com>
Thu, 28 Apr 2011 04:41:19 +0000 (21:41 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 28 Apr 2011 06:11:33 +0000 (23:11 -0700)
In twl4030_pwrbutton_probe error path, free_irq() was using NULL rather than
the driver data as the data pointer so free_irq() wouldn't have matched.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/misc/twl4030-pwrbutton.c

index f16972bddca473b54f8388fe6ba2709b0b65dd77..38e4b507b94cc629ef330cf173b1b41d3765e904 100644 (file)
@@ -89,7 +89,7 @@ static int __init twl4030_pwrbutton_probe(struct platform_device *pdev)
        return 0;
 
 free_irq:
-       free_irq(irq, NULL);
+       free_irq(irq, pwr);
 free_input_dev:
        input_free_device(pwr);
        return err;