diff options
author | Bedant Patnaik <bedant.patnaik@gmail.com> | 2022-06-09 00:58:43 +0530 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2022-06-12 14:40:09 +0200 |
commit | 65f936f3535950d2643eac5bf34a735a0e428cdd (patch) | |
tree | f245246111a692e8050b9ac480f6ee9cb5e12382 /.clang-format | |
parent | dc6a6ab58379f25bf991d8e4a13b001ed806e881 (diff) | |
download | linux-65f936f3535950d2643eac5bf34a735a0e428cdd.tar.bz2 |
platform/x86: hp-wmi: Use zero insize parameter only when supported
commit be9d73e64957 ("platform/x86: hp-wmi: Fix 0x05 error code reported by
several WMI calls") and commit 12b19f14a21a ("platform/x86: hp-wmi: Fix
hp_wmi_read_int() reporting error (0x05)") cause ACPI BIOS Error (bug):
Attempt to CreateField of length zero (20211217/dsopcode-133) because of
the ACPI method HWMC, which unconditionally creates a Field of
size (insize*8) bits:
CreateField (Arg1, 0x80, (Local5 * 0x08), DAIN)
In cases where args->insize = 0, the Field size is 0, resulting in
an error.
Fix this by using zero insize only if 0x5 error code is returned
Tested on Omen 15 AMD (2020) board ID: 8786.
Fixes: be9d73e64957 ("platform/x86: hp-wmi: Fix 0x05 error code reported by several WMI calls")
Signed-off-by: Bedant Patnaik <bedant.patnaik@gmail.com>
Tested-by: Jorge Lopez <jorge.lopez2@hp.com>
Link: https://lore.kernel.org/r/41be46743d21c78741232a47bbb5f1cdbcc3d21e.camel@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions