Home Home > GIT Browse > SLE12-SP3-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-02-21 09:30:52 +0100
committerJiri Slaby <jslaby@suse.cz>2019-02-21 09:30:52 +0100
commit391cf609349f2100ee0a68a3112a305f16e1e0ba (patch)
treed6be6e1c5f82c45734c00802722ac467d29a441b
parentaada41949bee07da53bd6ee7ca677fefc2a3b975 (diff)
hwmon: (lm80) Fix missing unlock on error in set_fan_div()
(git-fixes).
-rw-r--r--patches.suse/hwmon-lm80-Fix-missing-unlock-on-error-in-set_fan_di.patch32
-rw-r--r--series.conf1
2 files changed, 33 insertions, 0 deletions
diff --git a/patches.suse/hwmon-lm80-Fix-missing-unlock-on-error-in-set_fan_di.patch b/patches.suse/hwmon-lm80-Fix-missing-unlock-on-error-in-set_fan_di.patch
new file mode 100644
index 0000000000..8297262590
--- /dev/null
+++ b/patches.suse/hwmon-lm80-Fix-missing-unlock-on-error-in-set_fan_di.patch
@@ -0,0 +1,32 @@
+From: Wei Yongjun <weiyongjun1@huawei.com>
+Date: Wed, 26 Dec 2018 11:28:24 +0000
+Subject: hwmon: (lm80) Fix missing unlock on error in set_fan_div()
+Git-commit: 07bd14ccc3049f9c0147a91a4227a571f981601a
+Patch-mainline: v5.0-rc3
+References: git-fixes
+
+Add the missing unlock before return from function set_fan_div()
+in the error handling case.
+
+Fixes: c9c63915519b ("hwmon: (lm80) fix a missing check of the status of SMBus read")
+Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/hwmon/lm80.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/hwmon/lm80.c
++++ b/drivers/hwmon/lm80.c
+@@ -393,8 +393,10 @@ static ssize_t set_fan_div(struct device
+ }
+
+ rv = lm80_read_value(client, LM80_REG_FANDIV);
+- if (rv < 0)
++ if (rv < 0) {
++ mutex_unlock(&data->update_lock);
+ return rv;
++ }
+ reg = (rv & ~(3 << (2 * (nr + 1))))
+ | (data->fan_div[nr] << (2 * (nr + 1)));
+ lm80_write_value(client, LM80_REG_FANDIV, reg);
diff --git a/series.conf b/series.conf
index 883bcca1d9..7bc06003ec 100644
--- a/series.conf
+++ b/series.conf
@@ -24391,6 +24391,7 @@
patches.drivers/iommu-amd-fix-amd_iommu-force_isolation
patches.fixes/rbd-don-t-return-0-on-unmap-if-rbd_dev_flag_removing-is-set.patch
patches.suse/tty-Don-t-hold-ldisc-lock-in-tty_reopen-if-ldisc-pre.patch
+ patches.suse/hwmon-lm80-Fix-missing-unlock-on-error-in-set_fan_di.patch
patches.fixes/ceph-clear-inode-pointer-when-snap-realm-gets-dropped-by-its-inode.patch
patches.drivers/ibmveth-Do-not-process-frames-after-calling-napi_res.patch
patches.fixes/acpi-nfit-block-function-zero-dsms.patch