diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-07-18 17:09:22 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-07-18 17:10:31 -0700 |
commit | edf21d9c38b945b91d100bae59d951bce131d58b (patch) | |
tree | 73dbcfdfd47ef9765e42c37c1fee51cd7b278eb0 /drivers/input | |
parent | 2c204109ec1018f72114c7f19132a1109a3f0653 (diff) | |
download | talos-op-linux-edf21d9c38b945b91d100bae59d951bce131d58b.tar.gz talos-op-linux-edf21d9c38b945b91d100bae59d951bce131d58b.zip |
Input: pmic8xxx-keypad - fix a leak of the IRQ during init failure
Make sure we are passing the same cookie in all calls to
request_any_context_irq() and free_irq().
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/keyboard/pmic8xxx-keypad.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/input/keyboard/pmic8xxx-keypad.c b/drivers/input/keyboard/pmic8xxx-keypad.c index 40b02ae96f86..f2e8b9a347df 100644 --- a/drivers/input/keyboard/pmic8xxx-keypad.c +++ b/drivers/input/keyboard/pmic8xxx-keypad.c @@ -699,9 +699,9 @@ static int __devinit pmic8xxx_kp_probe(struct platform_device *pdev) return 0; err_pmic_reg_read: - free_irq(kp->key_stuck_irq, NULL); + free_irq(kp->key_stuck_irq, kp); err_req_stuck_irq: - free_irq(kp->key_sense_irq, NULL); + free_irq(kp->key_sense_irq, kp); err_gpio_config: err_get_irq: input_free_device(kp->input); @@ -716,8 +716,8 @@ static int __devexit pmic8xxx_kp_remove(struct platform_device *pdev) struct pmic8xxx_kp *kp = platform_get_drvdata(pdev); device_init_wakeup(&pdev->dev, 0); - free_irq(kp->key_stuck_irq, NULL); - free_irq(kp->key_sense_irq, NULL); + free_irq(kp->key_stuck_irq, kp); + free_irq(kp->key_sense_irq, kp); input_unregister_device(kp->input); kfree(kp); |