diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-09-30 05:36:00 +0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-10-13 18:49:24 +0400 |
commit | a9cc0202227caa4adb5e823d5fbce7790364941f (patch) | |
tree | 4a47075935391b4510597cae52e10c4d9de46444 /drivers/input/keyboard/twl4030_keypad.c | |
parent | 6792cbbb254712a8c0fa8a4c97c8d521c7c41c28 (diff) | |
download | linux-a9cc0202227caa4adb5e823d5fbce7790364941f.tar.xz |
Input: twl4030_keypad - fix error handling path
We should not try to call free_irq() when request_irq() failed.
Reported-by: G, Manjunath Kondaiah <manjugk@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/keyboard/twl4030_keypad.c')
-rw-r--r-- | drivers/input/keyboard/twl4030_keypad.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/input/keyboard/twl4030_keypad.c b/drivers/input/keyboard/twl4030_keypad.c index fb16b5e5ea13..09bef79d9da1 100644 --- a/drivers/input/keyboard/twl4030_keypad.c +++ b/drivers/input/keyboard/twl4030_keypad.c @@ -406,23 +406,22 @@ static int __devinit twl4030_kp_probe(struct platform_device *pdev) if (error) { dev_info(kp->dbg_dev, "request_irq failed for irq no=%d\n", kp->irq); - goto err3; + goto err2; } /* Enable KP and TO interrupts now. */ reg = (u8) ~(KEYP_IMR1_KP | KEYP_IMR1_TO); if (twl4030_kpwrite_u8(kp, reg, KEYP_IMR1)) { error = -EIO; - goto err4; + goto err3; } platform_set_drvdata(pdev, kp); return 0; -err4: +err3: /* mask all events - we don't care about the result */ (void) twl4030_kpwrite_u8(kp, 0xff, KEYP_IMR1); -err3: free_irq(kp->irq, NULL); err2: input_unregister_device(input); |