diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2023-03-12 03:47:57 +0000 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2023-03-16 15:42:03 +0100 |
commit | da62908efe80f132f691efc2ace4ca67626de86b (patch) | |
tree | 4d80b514ccc35c3c8d963896395053d2936e2f49 /drivers/platform/x86/think-lmi.c | |
parent | 8496bacae643018a2e24f76aa22426c4b9264933 (diff) | |
download | lwn-da62908efe80f132f691efc2ace4ca67626de86b.tar.gz lwn-da62908efe80f132f691efc2ace4ca67626de86b.zip |
platform/x86: think-lmi: Properly interpret return value of tlmi_setting
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>
Diffstat (limited to 'drivers/platform/x86/think-lmi.c')
-rw-r--r-- | drivers/platform/x86/think-lmi.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c index 86b33b74519b..c924e9e4a6a5 100644 --- a/drivers/platform/x86/think-lmi.c +++ b/drivers/platform/x86/think-lmi.c @@ -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) && @@ -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; |