]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: asus-wmi: Fix regression when probing for fan curve control
authorHans de Goede <hdegoede@redhat.com>
Sat, 5 Feb 2022 11:28:40 +0000 (12:28 +0100)
committerHans de Goede <hdegoede@redhat.com>
Sat, 5 Feb 2022 13:46:08 +0000 (14:46 +0100)
commit37569b29225fda480186f6a50060a78acff4c1ed
tree06b326523829559b20680977395c3ec96f3819ae
parente21b44436d0389ba4b84cde5e5ad3aa10cc97a23
platform/x86: asus-wmi: Fix regression when probing for fan curve control

The fan curve control patches introduced a regression for at least the
TUF FX506 and possibly other TUF series laptops that do not have support
for fan curve control.

As part of the probing process, asus_wmi_evaluate_method_buf is called
to get the factory default fan curve . The WMI management function
returns 0 on certain laptops to indicate lack of fan curve control
instead of ASUS_WMI_UNSUPPORTED_METHOD. This 0 is transformed to
-ENODATA which results in failure when probing.

Fixes: f80bc2620628 ("platform/x86: asus-wmi: Add support for custom fan curves")
Reported-and-tested-by: Abhijeet V <abhijeetviswa@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20220205112840.33095-1-hdegoede@redhat.com
drivers/platform/x86/asus-wmi.c