Skip to content

Commit da62908

Browse files
t-8chjwrdegoede
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
1 parent 8496bac commit da62908

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/platform/x86/think-lmi.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,6 @@ static struct tlmi_pwd_setting *tlmi_create_auth(const char *pwd_type,
13531353

13541354
static int tlmi_analyze(void)
13551355
{
1356-
acpi_status status;
13571356
int i, ret;
13581357

13591358
if (wmi_has_guid(LENOVO_SET_BIOS_SETTINGS_GUID) &&
@@ -1390,8 +1389,8 @@ static int tlmi_analyze(void)
13901389
char *p;
13911390

13921391
tlmi_priv.setting[i] = NULL;
1393-
status = tlmi_setting(i, &item, LENOVO_BIOS_SETTING_GUID);
1394-
if (ACPI_FAILURE(status))
1392+
ret = tlmi_setting(i, &item, LENOVO_BIOS_SETTING_GUID);
1393+
if (ret)
13951394
break;
13961395
if (!item)
13971396
break;

0 commit comments

Comments
 (0)