Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-05-17 06:38:43 +0200
committerJiri Slaby <jslaby@suse.cz>2019-05-17 06:38:45 +0200
commitffe2fc4b1191766ce0ab4c65054dbc205c66a248 (patch)
treece0c5608974a2c1643a587fe34b63d6b77300704
parentaa9a4ead9512ac923feb9c6903c48aeea8d106e3 (diff)
hwmon: (pwm-fan) Disable PWM if fetching cooling data fails
-rw-r--r--patches.kernel.org/5.1.3-004-hwmon-pwm-fan-Disable-PWM-if-fetching-cooling-d.patch39
-rw-r--r--series.conf1
2 files changed, 40 insertions, 0 deletions
diff --git a/patches.kernel.org/5.1.3-004-hwmon-pwm-fan-Disable-PWM-if-fetching-cooling-d.patch b/patches.kernel.org/5.1.3-004-hwmon-pwm-fan-Disable-PWM-if-fetching-cooling-d.patch
new file mode 100644
index 0000000000..df08097fcc
--- /dev/null
+++ b/patches.kernel.org/5.1.3-004-hwmon-pwm-fan-Disable-PWM-if-fetching-cooling-d.patch
@@ -0,0 +1,39 @@
+From: Stefan Wahren <stefan.wahren@i2se.com>
+Date: Wed, 3 Apr 2019 14:48:33 +0200
+Subject: [PATCH] hwmon: (pwm-fan) Disable PWM if fetching cooling data fails
+References: bnc#1012628
+Patch-mainline: 5.1.3
+Git-commit: 53f1647da3e8fb3e89066798f0fdc045064d353d
+
+commit 53f1647da3e8fb3e89066798f0fdc045064d353d upstream.
+
+In case pwm_fan_of_get_cooling_data() fails we should disable the PWM
+just like in the other error cases.
+
+Fixes: 2e5219c77183 ("hwmon: (pwm-fan) Read PWM FAN configuration from device tree")
+Cc: <stable@vger.kernel.org> # 4.14+
+Reported-by: Guenter Rock <linux@roeck-us.net>
+Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/hwmon/pwm-fan.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c
+index 167221c7628a..e4c5197417a8 100644
+--- a/drivers/hwmon/pwm-fan.c
++++ b/drivers/hwmon/pwm-fan.c
+@@ -271,7 +271,7 @@ static int pwm_fan_probe(struct platform_device *pdev)
+
+ ret = pwm_fan_of_get_cooling_data(&pdev->dev, ctx);
+ if (ret)
+- return ret;
++ goto err_pwm_disable;
+
+ ctx->pwm_fan_state = ctx->pwm_fan_max_state;
+ if (IS_ENABLED(CONFIG_THERMAL)) {
+--
+2.21.0
+
diff --git a/series.conf b/series.conf
index 0ff2819e22..230fd3c7db 100644
--- a/series.conf
+++ b/series.conf
@@ -89,6 +89,7 @@
patches.kernel.org/5.1.3-001-platform-x86-sony-laptop-Fix-unintentional-fall.patch
patches.kernel.org/5.1.3-002-platform-x86-thinkpad_acpi-Disable-Bluetooth-fo.patch
patches.kernel.org/5.1.3-003-platform-x86-dell-laptop-fix-rfkill-functionali.patch
+ patches.kernel.org/5.1.3-004-hwmon-pwm-fan-Disable-PWM-if-fetching-cooling-d.patch
########################################################
# Build fixes that apply to the vanilla kernel too.