Commit daf87bff authored by Arvind Yadav's avatar Arvind Yadav Committed by Dmitry Torokhov

Input: palmas-pwrbutton - handle return value of platform_get_irq()

platform_get_irq() can fail here and we must check its return value.
Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent d5f9c43d
...@@ -210,6 +210,11 @@ static int palmas_pwron_probe(struct platform_device *pdev) ...@@ -210,6 +210,11 @@ static int palmas_pwron_probe(struct platform_device *pdev)
INIT_DELAYED_WORK(&pwron->input_work, palmas_power_button_work); INIT_DELAYED_WORK(&pwron->input_work, palmas_power_button_work);
pwron->irq = platform_get_irq(pdev, 0); pwron->irq = platform_get_irq(pdev, 0);
if (pwron->irq < 0) {
error = pwron->irq;
goto err_free_input;
}
error = request_threaded_irq(pwron->irq, NULL, pwron_irq, error = request_threaded_irq(pwron->irq, NULL, pwron_irq,
IRQF_TRIGGER_HIGH | IRQF_TRIGGER_HIGH |
IRQF_TRIGGER_LOW | IRQF_TRIGGER_LOW |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment