mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 05:11:48 +00:00
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>
This commit is contained in:
parent
05aa43cce0
commit
c7dfc2facb
@ -290,7 +290,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…
Reference in New Issue
Block a user