mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-04 20:23:04 +09:00
platform/x86: hp-wmi: Fix error value for hp_wmi_tablet_state
commit c7dfc2facb 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:
committed by
Greg Kroah-Hartman
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user