Skip to content

Commit e3d13da

Browse files
committed
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: 0f0ac15 ("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
1 parent 868d761 commit e3d13da

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/platform/x86/asus-wmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2223,7 +2223,7 @@ static int fan_curve_check_present(struct asus_wmi *asus, bool *available,
22232223

22242224
err = fan_curve_get_factory_default(asus, fan_dev);
22252225
if (err) {
2226-
if (err == -ENODEV)
2226+
if (err == -ENODEV || err == -ENODATA)
22272227
return 0;
22282228
return err;
22292229
}

0 commit comments

Comments
 (0)