projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f807f4b
)
platform/x86: msi-wmi: Fix variable 'status' set but not used compiler warning
author
Hans de Goede
<hdegoede@redhat.com>
Thu, 4 Feb 2021 12:19:31 +0000
(13:19 +0100)
committer
Hans de Goede
<hdegoede@redhat.com>
Thu, 4 Feb 2021 12:35:20 +0000
(13:35 +0100)
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
drivers/platform/x86/msi-wmi.c
patch
|
blob
|
history
diff --git
a/drivers/platform/x86/msi-wmi.c
b/drivers/platform/x86/msi-wmi.c
index 64ee7819c9d380273e76c2dae368ae38a9795ddc..fd318cdfe313e83232bf40831f5b95693be56ce2 100644
(file)
--- 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;