]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
platform/x86: asus-wmi: Don't load fan curves without fan
authorThomas Weißschuh <linux@weissschuh.net>
Wed, 21 Dec 2022 17:59:51 +0000 (17:59 +0000)
committerHans de Goede <hdegoede@redhat.com>
Thu, 12 Jan 2023 18:36:06 +0000 (19:36 +0100)
If we do not have a fan it does not make sense to load curves for it.
This removes the following warnings from the kernel log:

asus_wmi: fan_curve_get_factory_default (0x00110024) failed: -19
asus_wmi: fan_curve_get_factory_default (0x00110025) failed: -19

Fixes: a2bdf10ce96e ("platform/x86: asus-wmi: Increase FAN_CURVE_BUF_LEN to 32")
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20221221-asus-fan-v1-3-e07f3949725b@weissschuh.net
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/asus-wmi.c

index 4a289ca7e76c965bea31a67cadf207c23a75c5ef..104188d70988cbae085b1050fb7d3832e5a5fdb8 100644 (file)
@@ -2438,6 +2438,9 @@ static int fan_curve_check_present(struct asus_wmi *asus, bool *available,
 
        *available = false;
 
+       if (asus->fan_type == FAN_TYPE_NONE)
+               return 0;
+
        err = fan_curve_get_factory_default(asus, fan_dev);
        if (err) {
                return 0;