diff options
author | Hans de Goede <hdegoede@redhat.com> | 2021-02-04 13:19:31 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-02-04 13:35:20 +0100 |
commit | 2c15644ebed06949458bf6956ed124164ef51063 (patch) | |
tree | 83765f71f959f8402c75cf12a89ffa4f15640ed9 /drivers/platform | |
parent | f807f4b7b32db00fc8622289644362e0695989bb (diff) | |
download | linux-2c15644ebed06949458bf6956ed124164ef51063.tar.gz linux-2c15644ebed06949458bf6956ed124164ef51063.tar.bz2 linux-2c15644ebed06949458bf6956ed124164ef51063.zip |
platform/x86: msi-wmi: Fix variable 'status' set but not used compiler warning
Explicitly check the status rather then relying on output.pointer staying
NULL on an error.
Reported-by: Maximilian Luz <luzmaximilian@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210204121931.131617-1-hdegoede@redhat.com
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/msi-wmi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/platform/x86/msi-wmi.c b/drivers/platform/x86/msi-wmi.c index 64ee7819c9d3..fd318cdfe313 100644 --- a/drivers/platform/x86/msi-wmi.c +++ b/drivers/platform/x86/msi-wmi.c @@ -96,6 +96,8 @@ static int msi_wmi_query_block(int instance, int *ret) struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL }; status = wmi_query_block(MSIWMI_BIOS_GUID, instance, &output); + if (ACPI_FAILURE(status)) + return -EIO; obj = output.pointer; |