Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+2
+2
drivers/platform/x86/msi-wmi.c
··· 96 96 struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL }; 97 97 98 98 status = wmi_query_block(MSIWMI_BIOS_GUID, instance, &output); 99 + if (ACPI_FAILURE(status)) 100 + return -EIO; 99 101 100 102 obj = output.pointer; 101 103