summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2022-12-21 17:59:51 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-18 11:58:16 +0100
commit0e082105895c448ea8b20daf881c3e2759ed7e15 (patch)
treec6b2b9ffb8efe0f271256ea8295b4c0ebd20e335 /drivers/platform
parent127bf1d6bfe3add22136c9dd45f1b7ccf4442bc4 (diff)
downloadlinux-0e082105895c448ea8b20daf881c3e2759ed7e15.tar.gz
linux-0e082105895c448ea8b20daf881c3e2759ed7e15.tar.bz2
linux-0e082105895c448ea8b20daf881c3e2759ed7e15.zip
platform/x86: asus-wmi: Don't load fan curves without fan
commit 01fd7e7851ba2275662f771ee17d1f80e7bbfa52 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/asus-wmi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 872efc1d5b36..f051b21653d6 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -2436,6 +2436,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;