From: Guenter Roeck <linux@roeck-us.net>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-hwmon@vger.kernel.org, martin.blumenstingl@googlemail.com,
jdelvare@suse.com
Subject: Re: [PATCH -next] hwmon: (jc42) Fix missing unlock on error in jc42_write()
Date: Thu, 27 Oct 2022 06:07:02 -0700 [thread overview]
Message-ID: <20221027130702.GA395203@roeck-us.net> (raw)
In-Reply-To: <20221027062931.598247-1-yangyingliang@huawei.com>
On Thu, Oct 27, 2022 at 02:29:31PM +0800, Yang Yingliang wrote:
> 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>
Excellent catch. Applied to hwmon-next.
Thanks,
Guenter
> ---
> 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.
prev parent reply other threads:[~2022-10-27 13:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-27 6:29 [PATCH -next] hwmon: (jc42) Fix missing unlock on error in jc42_write() Yang Yingliang
2022-10-27 6:39 ` Martin Blumenstingl
2022-10-27 13:07 ` Guenter Roeck [this message]
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=20221027130702.GA395203@roeck-us.net \
--to=linux@roeck-us.net \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=yangyingliang@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox