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>
This commit is contained in:
parent
df5371592a
commit
ce93b66454
@ -291,7 +291,7 @@ static int hp_wmi_tablet_state(void)
|
||||
int ret = hp_wmi_perform_query(HPWMI_HARDWARE_QUERY, 0, &state,
|
||||
sizeof(state), sizeof(state));
|
||||
if (ret)
|
||||
return ret;
|
||||
return -EINVAL;
|
||||
|
||||
return (state & 0x4) ? 1 : 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user