Skip to content

Commit edf21d9

Browse files
AxelLindtor
authored andcommitted
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>
1 parent 2c20410 commit edf21d9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎drivers/input/keyboard/pmic8xxx-keypad.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -699,9 +699,9 @@ static int __devinit pmic8xxx_kp_probe(struct platform_device *pdev)
699699
return 0;
700700

701701
err_pmic_reg_read:
702-
free_irq(kp->key_stuck_irq, NULL);
702+
free_irq(kp->key_stuck_irq, kp);
703703
err_req_stuck_irq:
704-
free_irq(kp->key_sense_irq, NULL);
704+
free_irq(kp->key_sense_irq, kp);
705705
err_gpio_config:
706706
err_get_irq:
707707
input_free_device(kp->input);
@@ -716,8 +716,8 @@ static int __devexit pmic8xxx_kp_remove(struct platform_device *pdev)
716716
struct pmic8xxx_kp *kp = platform_get_drvdata(pdev);
717717

718718
device_init_wakeup(&pdev->dev, 0);
719-
free_irq(kp->key_stuck_irq, NULL);
720-
free_irq(kp->key_sense_irq, NULL);
719+
free_irq(kp->key_stuck_irq, kp);
720+
free_irq(kp->key_sense_irq, kp);
721721
input_unregister_device(kp->input);
722722
kfree(kp);
723723

0 commit comments

Comments
 (0)