Skip to content

Commit ce93b66

Browse files
Carlo Caionegregkh
authored andcommitted
platform/x86: hp-wmi: Fix error value for hp_wmi_tablet_state
commit c7dfc2facbd69dad89b75e13c608da709668dcd0 upstream. 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> Cc: Philip Müller <philm@manjaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent df53715 commit ce93b66

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/platform/x86/hp-wmi.c

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

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

0 commit comments

Comments
 (0)