summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-04-02 19:43:28 +0200
committerCorey Minyard <cminyard@mvista.com>2021-04-02 19:53:25 +0200
commitbd7a33bfa1f1d0295058003899568570a7de0998 (patch)
treedb4235d1e4e227b7aff87debcb11aaf8673ed90d /drivers
parentipmi_si: Utilize temporary variable to hold device pointer (diff)
downloadlinux-bd7a33bfa1f1d0295058003899568570a7de0998.tar.xz
linux-bd7a33bfa1f1d0295058003899568570a7de0998.zip
ipmi_si: Use proper ACPI macros to check error code for failures
Instead of direct comparison, use proper ACPI macros to check error code for failures. While at it, drop unneeded 'else' keyword. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Message-Id: <20210402174334.13466-5-andriy.shevchenko@linux.intel.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/ipmi/ipmi_si_platform.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/ipmi/ipmi_si_platform.c b/drivers/char/ipmi/ipmi_si_platform.c
index 5f641d316ecb..b87bd9933724 100644
--- a/drivers/char/ipmi/ipmi_si_platform.c
+++ b/drivers/char/ipmi/ipmi_si_platform.c
@@ -85,18 +85,18 @@ static int acpi_gpe_irq_setup(struct si_sm_io *io)
ACPI_GPE_LEVEL_TRIGGERED,
&ipmi_acpi_gpe,
io);
- if (status != AE_OK) {
+ if (ACPI_FAILURE(status)) {
dev_warn(io->dev,
"Unable to claim ACPI GPE %d, running polled\n",
io->irq);
io->irq = 0;
return -EINVAL;
- } else {
- io->irq_cleanup = acpi_gpe_irq_cleanup;
- ipmi_irq_finish_setup(io);
- dev_info(io->dev, "Using ACPI GPE %d\n", io->irq);
- return 0;
}
+
+ io->irq_cleanup = acpi_gpe_irq_cleanup;
+ ipmi_irq_finish_setup(io);
+ dev_info(io->dev, "Using ACPI GPE %d\n", io->irq);
+ return 0;
}
#endif