From: Guenter Roeck <linux@roeck-us.net>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Beniamin Bia <beniamin.bia@analog.com>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Jean Delvare <jdelvare@suse.com>,
linux-hwmon@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] hwmon: (adm1177) Fix adm1177_write_alert_thr()
Date: Tue, 14 Jan 2020 06:12:40 -0800 [thread overview]
Message-ID: <20200114141240.GA16302@roeck-us.net> (raw)
In-Reply-To: <20200114055125.ro5slro6zewr56tx@kili.mountain>
On Tue, Jan 14, 2020 at 08:51:25AM +0300, Dan Carpenter wrote:
> There is a reversed condition so the adm1177_write_alert_thr() function
> doesn't update "st->alert_threshold_ua".
>
> Fixes: 829091f9c56c ("hwmon: (adm1177) Add ADM1177 Hot Swap Controller and Digital Power Monitor driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
The fix was folded into v4 of the series, so I took that.
Thanks for reporting!
Guenter
> ---
> drivers/hwmon/adm1177.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/adm1177.c b/drivers/hwmon/adm1177.c
> index 1f2ff7a29306..d314223a404a 100644
> --- a/drivers/hwmon/adm1177.c
> +++ b/drivers/hwmon/adm1177.c
> @@ -63,7 +63,7 @@ static int adm1177_write_alert_thr(struct adm1177_state *st,
>
> ret = i2c_smbus_write_byte_data(st->client, ADM1177_REG_ALERT_TH,
> val);
> - if (!ret)
> + if (ret)
> return ret;
>
> st->alert_threshold_ua = alert_threshold_ua;
prev parent reply other threads:[~2020-01-14 14:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-14 5:51 [PATCH] hwmon: (adm1177) Fix adm1177_write_alert_thr() Dan Carpenter
2020-01-14 14:12 ` 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=20200114141240.GA16302@roeck-us.net \
--to=linux@roeck-us.net \
--cc=Michael.Hennerich@analog.com \
--cc=beniamin.bia@analog.com \
--cc=dan.carpenter@oracle.com \
--cc=jdelvare@suse.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).