Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Arvind Yadav and committed by
Dmitry Torokhov
daf87bff d5f9c43d

+5
+5
drivers/input/misc/palmas-pwrbutton.c
··· 210 210 INIT_DELAYED_WORK(&pwron->input_work, palmas_power_button_work); 211 211 212 212 pwron->irq = platform_get_irq(pdev, 0); 213 + if (pwron->irq < 0) { 214 + error = pwron->irq; 215 + goto err_free_input; 216 + } 217 + 213 218 error = request_threaded_irq(pwron->irq, NULL, pwron_irq, 214 219 IRQF_TRIGGER_HIGH | 215 220 IRQF_TRIGGER_LOW |