mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
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
This commit is contained in:
parent
f807f4b7b3
commit
2c15644ebe
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue