summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/hp-wmi.c
diff options
context:
space:
mode:
authorCarlo Caione <carlo@endlessm.com>2017-04-09 16:56:07 +0300
committerDarren Hart (VMware) <dvhart@infradead.org>2017-04-14 18:26:34 +0300
commitc7dfc2facbd69dad89b75e13c608da709668dcd0 (patch)
tree2c94ea4c24ef27aa2b7650ef59b8f363488ff64b /drivers/platform/x86/hp-wmi.c
parent05aa43cce0e287a87e686931d65707953bc60d07 (diff)
downloadlinux-c7dfc2facbd69dad89b75e13c608da709668dcd0.tar.xz
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>
Diffstat (limited to 'drivers/platform/x86/hp-wmi.c')
-rw-r--r--drivers/platform/x86/hp-wmi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index 7abf92d0ba81..9db502c42b5c 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -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;
}