diff mbox

Input: twl4030-pwrbutton - fix a leak of the IRQ during init failure

Message ID 1303963041.2588.3.camel@phoenix (mailing list archive)
State Accepted
Commit 5c9db64888ecabfb170081335f30e3d7192fbcf4
Headers show

Commit Message

axel lin April 28, 2011, 3:57 a.m. UTC
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>
---
 drivers/input/misc/twl4030-pwrbutton.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Dmitry Torokhov April 28, 2011, 6:26 a.m. UTC | #1
On Thu, Apr 28, 2011 at 11:57:21AM +0800, Axel Lin wrote:
> 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.

Applied, thanks Axel.
diff mbox

Patch

diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c
index f16972b..38e4b50 100644
--- a/drivers/input/misc/twl4030-pwrbutton.c
+++ b/drivers/input/misc/twl4030-pwrbutton.c
@@ -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;