Skip to content

Commit c7dfc2f

Browse files
Carlo Caionedvhart
authored andcommitted
platform/x86: hp-wmi: Fix error value for hp_wmi_tablet_state
hp_wmi_tablet_state() fails to return the correct error code when hp_wmi_perform_query() returns the HP WMI query specific error code that is a positive value. Signed-off-by: Carlo Caione <carlo@endlessm.com> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
1 parent 05aa43c commit c7dfc2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/platform/x86/hp-wmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ static int hp_wmi_tablet_state(void)
290290
int ret = hp_wmi_perform_query(HPWMI_HARDWARE_QUERY, 0, &state,
291291
sizeof(state), sizeof(state));
292292
if (ret)
293-
return ret;
293+
return -EINVAL;
294294

295295
return (state & 0x4) ? 1 : 0;
296296
}

0 commit comments

Comments
 (0)