From: Yang Yingliang <yangyingliang@huawei.com>
To: <linux-hwmon@vger.kernel.org>
Cc: <martin.blumenstingl@googlemail.com>, <linux@roeck-us.net>,
<jdelvare@suse.com>, <yangyingliang@huawei.com>
Subject: [PATCH -next] hwmon: (jc42) Fix missing unlock on error in jc42_write()
Date: Thu, 27 Oct 2022 14:29:31 +0800 [thread overview]
Message-ID: <20221027062931.598247-1-yangyingliang@huawei.com> (raw)
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>
---
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,
®val);
if (ret)
- return ret;
+ break;
/*
* JC42.4 compliant chips only support four hysteresis values.
--
2.25.1
next reply other threads:[~2022-10-27 6:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-27 6:29 Yang Yingliang [this message]
2022-10-27 6:39 ` [PATCH -next] hwmon: (jc42) Fix missing unlock on error in jc42_write() Martin Blumenstingl
2022-10-27 13:07 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221027062931.598247-1-yangyingliang@huawei.com \
--to=yangyingliang@huawei.com \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=martin.blumenstingl@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.