Linux-Hwmon Archive on lore.kernel.org
 help / color / Atom feed
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
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;

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-14  5:51 Dan Carpenter
2020-01-14 14:12 ` Guenter Roeck [this message]

Reply instructions:

You may reply publically 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

Linux-Hwmon Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-hwmon/0 linux-hwmon/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-hwmon linux-hwmon/ https://lore.kernel.org/linux-hwmon \
		linux-hwmon@vger.kernel.org
	public-inbox-index linux-hwmon

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-hwmon


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git