Commit 2c15644e authored by Hans de Goede's avatar Hans de Goede
Browse files

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: default avatarMaximilian Luz <luzmaximilian@gmail.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210204121931.131617-1-hdegoede@redhat.com
parent f807f4b7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;