[PATCH 1/3] platform/x86: hp: hp_accel: Propagate errors from optional IRQ lookup
| Newsgroups | org.kernel.vger.platform-driver-x86,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
From: bui duc phuc <[email protected]> platform_get_irq_optional() returns a positive IRQ number on success or a negative error code on failure. For an optional IRQ, -ENXIO indicates that no optional IRQ is available, while other errors should be propagated. Propagate all error codes returned by platform_get_irq_optional() other than -ENXIO. Signed-off-by: bui duc phuc <[email protected]> --- drivers/platform/x86/hp/hp_accel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/platform/x86/hp/hp_accel.c b/drivers/platform/x86/hp/hp_accel.c index 39b73dc473f1..8f6b03196540 100644 --- a/drivers/platform/x86/hp/hp_accel.c +++ b/drivers/platform/x86/hp/hp_accel.c @@ -309,6 +309,8 @@ static int lis3lv02d_probe(struct platform_device *device) /* obtain IRQ number of our device from ACPI */ ret = platform_get_irq_optional(device, 0); + if (ret < 0 && ret != -ENXIO) + return ret; if (ret > 0) lis3_dev.irq = ret; -- 2.43.0