[PATCH] asus-wmi: Fix regression when probing for fan curve control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The fan curve control patches introduced a regression for atleast 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.

Signed-off-by: Abhijeet V <abhijeetviswa@xxxxxxxxx>
---
 drivers/platform/x86/asus-wmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index a3b83b22a3b..adeb58765dc 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -3585,7 +3585,7 @@ static int asus_wmi_add(struct platform_device *pdev)
 		goto fail_hwmon;
 
 	err = asus_wmi_custom_fan_curve_init(asus);
-	if (err)
+	if (err && err != -ENODATA)
 		goto fail_custom_fan_curve;
 
 	err = asus_wmi_led_init(asus);
-- 
2.35.1





[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux