]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 6.1
authorSasha Levin <sashal@kernel.org>
Sun, 25 Dec 2022 23:49:38 +0000 (18:49 -0500)
committerSasha Levin <sashal@kernel.org>
Sun, 25 Dec 2022 23:49:38 +0000 (18:49 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-6.1/hwmon-jc42-fix-missing-unlock-on-error-in-jc42_write.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/hwmon-jc42-fix-missing-unlock-on-error-in-jc42_write.patch b/queue-6.1/hwmon-jc42-fix-missing-unlock-on-error-in-jc42_write.patch
new file mode 100644 (file)
index 0000000..d63a919
--- /dev/null
@@ -0,0 +1,40 @@
+From 60687de2354a410ba05d23e75272c1fb8c741eb6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 27 Oct 2022 14:29:31 +0800
+Subject: hwmon: (jc42) Fix missing unlock on error in jc42_write()
+
+From: Yang Yingliang <yangyingliang@huawei.com>
+
+[ Upstream commit b744db17abf6a2efc2bfa80870cc88e9799a8ccc ]
+
+Add the missing unlock before return from function jc42_write()
+in the error handling case.
+
+Fixes: 37dedaee8bc6 ("hwmon: (jc42) Convert register access and caching to regmap/regcache")
+Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
+Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
+Link: https://lore.kernel.org/r/20221027062931.598247-1-yangyingliang@huawei.com
+Reported-by: kernel test robot <lkp@intel.com>
+Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/hwmon/jc42.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/hwmon/jc42.c b/drivers/hwmon/jc42.c
+index 0554b41c32bc..6593d81cb901 100644
+--- a/drivers/hwmon/jc42.c
++++ b/drivers/hwmon/jc42.c
+@@ -350,7 +350,7 @@ static int jc42_write(struct device *dev, enum hwmon_sensor_types type,
+               ret = regmap_read(data->regmap, JC42_REG_TEMP_CRITICAL,
+                                 &regval);
+               if (ret)
+-                      return ret;
++                      break;
+               /*
+                * JC42.4 compliant chips only support four hysteresis values.
+-- 
+2.35.1
+
index 337da514e6d2a6515eeee4ba4b31c92beed0572e..943425953237ec4760182b2d2c6a4a1505f89f87 100644 (file)
@@ -1066,3 +1066,4 @@ scsi-target-iscsi-fix-a-race-condition-between-login.patch
 orangefs-fix-kmemleak-in-orangefs_prepare_debugfs_he.patch
 orangefs-fix-kmemleak-in-orangefs_sysfs_init.patch
 orangefs-fix-kmemleak-in-orangefs_-kernel-client-_de.patch
+hwmon-jc42-fix-missing-unlock-on-error-in-jc42_write.patch