Skip to content

Commit

Permalink
platform/x86: think-lmi: Properly interpret return value of tlmi_setting
Browse files Browse the repository at this point in the history
The return value of tlmi_settings() is an errorcode, not an acpi_status.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20230312-think-lmi-status-v1-1-4e9f36322cc4@weissschuh.net
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  • Loading branch information
Thomas Weißschuh authored and Hans de Goede committed Mar 16, 2023
1 parent 8496bac commit da62908
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/platform/x86/think-lmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,6 @@ static struct tlmi_pwd_setting *tlmi_create_auth(const char *pwd_type,

static int tlmi_analyze(void)
{
acpi_status status;
int i, ret;

if (wmi_has_guid(LENOVO_SET_BIOS_SETTINGS_GUID) &&
Expand Down Expand Up @@ -1390,8 +1389,8 @@ static int tlmi_analyze(void)
char *p;

tlmi_priv.setting[i] = NULL;
status = tlmi_setting(i, &item, LENOVO_BIOS_SETTING_GUID);
if (ACPI_FAILURE(status))
ret = tlmi_setting(i, &item, LENOVO_BIOS_SETTING_GUID);
if (ret)
break;
if (!item)
break;
Expand Down

0 comments on commit da62908

Please sign in to comment.