Skip to contentSkip to conversation

Patch "platform/x86: hp-wmi: Fix error value for hp_wmi_tablet_state" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Nov 10, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

platform/x86: hp-wmi: Fix error value for hp_wmi_tablet_state

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
platform-x86-hp-wmi-fix-error-value-for-hp_wmi_tablet_state.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From c7dfc2facbd69dad89b75e13c608da709668dcd0 Mon Sep 17 00:00:00 2001

From: Carlo Caione <[email protected]>
Date: Sun, 9 Apr 2017 15:56:07 +0200
Subject: platform/x86: hp-wmi: Fix error value for hp_wmi_tablet_state

From: Carlo Caione <[email protected]>

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.

---
 drivers/platform/x86/hp-wmi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/hp-wmi.c +1 -1
@@ -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;
 }

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/platform-x86-hp-wmi-do-not-shadow-error-values.patch queue-4.4/platform-x86-hp-wmi-fix-detection-for-dock-and-tablet-mode.patch queue-4.4/platform-x86-hp-wmi-fix-error-value-for-hp_wmi_tablet_state.patch