Skip to content

Commit 12b19f1

Browse files
Jorge Lopezjwrdegoede
authored andcommitted
platform/x86: hp-wmi: Fix hp_wmi_read_int() reporting error (0x05)
The purpose of this patch is to introduce a fix to hp_wmi_read_int() and eliminate failure error (0x05). Several WMI queries leverage hp_wmi_read_int() to read their data and were failing with error 0x05. HPWMI_DISPLAY_QUERY HPWMI_HDDTEMP_QUERY HPWMI_ALS_QUERY HPWMI_HARDWARE_QUERY HPWMI_WIRELESS_QUERY HPWMI_POSTCODEERROR_QUERY The failure occurs because hp_wmi_read_int() calls hp_wmi_perform_query() with input parameter of size greater than zero. Invoking those WMI commands with an input buffer size greater than zero causes the command to be rejected and error 0x05 be returned. All changes were validated on a HP ZBook Workstation notebook, HP EliteBook x360, and HP EliteBook 850 G8. Signed-off-by: Jorge Lopez <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
1 parent 854abe2 commit 12b19f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/platform/x86/hp-wmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ static int hp_wmi_read_int(int query)
337337
int val = 0, ret;
338338

339339
ret = hp_wmi_perform_query(query, HPWMI_READ, &val,
340-
sizeof(val), sizeof(val));
340+
0, sizeof(val));
341341

342342
if (ret)
343343
return ret < 0 ? ret : -EINVAL;

0 commit comments

Comments
 (0)