From: Sasha Levin Date: Sun, 25 Dec 2022 23:49:40 +0000 (-0500) Subject: Fixes for 5.15 X-Git-Tag: v5.15.86~70 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7937bfa51689ef96631048599ba31634e69092cc;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 5.15 Signed-off-by: Sasha Levin --- diff --git a/queue-5.15/hwmon-jc42-fix-missing-unlock-on-error-in-jc42_write.patch b/queue-5.15/hwmon-jc42-fix-missing-unlock-on-error-in-jc42_write.patch new file mode 100644 index 00000000000..5181a066e85 --- /dev/null +++ b/queue-5.15/hwmon-jc42-fix-missing-unlock-on-error-in-jc42_write.patch @@ -0,0 +1,40 @@ +From 4f3fbde360ed422f29a5e7a45f0110ae2d819ad6 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 27 Oct 2022 14:29:31 +0800 +Subject: hwmon: (jc42) Fix missing unlock on error in jc42_write() + +From: Yang Yingliang + +[ 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 +Reviewed-by: Martin Blumenstingl +Link: https://lore.kernel.org/r/20221027062931.598247-1-yangyingliang@huawei.com +Reported-by: kernel test robot +Reported-by: Dan Carpenter +Signed-off-by: Guenter Roeck +Signed-off-by: Sasha Levin +--- + 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 5240bfdfcf2e..52f341d46029 100644 +--- a/drivers/hwmon/jc42.c ++++ b/drivers/hwmon/jc42.c +@@ -340,7 +340,7 @@ static int jc42_write(struct device *dev, enum hwmon_sensor_types type, + ret = regmap_read(data->regmap, JC42_REG_TEMP_CRITICAL, + ®val); + if (ret) +- return ret; ++ break; + + /* + * JC42.4 compliant chips only support four hysteresis values. +-- +2.35.1 + diff --git a/queue-5.15/series b/queue-5.15/series index 6a432349be5..34c8f9a4f01 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -685,3 +685,4 @@ orangefs-fix-kmemleak-in-orangefs_prepare_debugfs_he.patch orangefs-fix-kmemleak-in-orangefs_-kernel-client-_de.patch tools-include-add-_ret_ip_-and-math-definitions-to-k.patch kvm-selftests-fix-build-regression-by-using-accessor.patch +hwmon-jc42-fix-missing-unlock-on-error-in-jc42_write.patch