提交 edf21d9c 编写于 作者: A Axel Lin 提交者: Dmitry Torokhov

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: NAxel Lin <axel.lin@gmail.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 2c204109
...@@ -699,9 +699,9 @@ static int __devinit pmic8xxx_kp_probe(struct platform_device *pdev) ...@@ -699,9 +699,9 @@ static int __devinit pmic8xxx_kp_probe(struct platform_device *pdev)
return 0; return 0;
err_pmic_reg_read: err_pmic_reg_read:
free_irq(kp->key_stuck_irq, NULL); free_irq(kp->key_stuck_irq, kp);
err_req_stuck_irq: err_req_stuck_irq:
free_irq(kp->key_sense_irq, NULL); free_irq(kp->key_sense_irq, kp);
err_gpio_config: err_gpio_config:
err_get_irq: err_get_irq:
input_free_device(kp->input); input_free_device(kp->input);
...@@ -716,8 +716,8 @@ static int __devexit pmic8xxx_kp_remove(struct platform_device *pdev) ...@@ -716,8 +716,8 @@ static int __devexit pmic8xxx_kp_remove(struct platform_device *pdev)
struct pmic8xxx_kp *kp = platform_get_drvdata(pdev); struct pmic8xxx_kp *kp = platform_get_drvdata(pdev);
device_init_wakeup(&pdev->dev, 0); device_init_wakeup(&pdev->dev, 0);
free_irq(kp->key_stuck_irq, NULL); free_irq(kp->key_stuck_irq, kp);
free_irq(kp->key_sense_irq, NULL); free_irq(kp->key_sense_irq, kp);
input_unregister_device(kp->input); input_unregister_device(kp->input);
kfree(kp); kfree(kp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册