Linux-Hwmon Archive on
 help / color / Atom feed
From: Dan Carpenter <>
To: Jean Delvare <>,
	"Darrick J. Wong" <>
Cc: Guenter Roeck <>,,
Subject: [PATCH] hwmon: (adt7462) Fix an error return in ADT7462_REG_VOLT()
Date: Tue, 3 Mar 2020 13:16:08 +0300
Message-ID: <20200303101608.kqjwfcazu2ylhi2a@kili.mountain> (raw)

This is only called from adt7462_update_device().  The caller expects it
to return zero on error.  I fixed a similar issue earlier in commit
a4bf06d58f21 ("hwmon: (adt7462) ADT7462_REG_VOLT_MAX() should return 0")
but I missed this one.

Fixes: c0b4e3ab0c76 ("adt7462: new hwmon driver")
Signed-off-by: Dan Carpenter <>
 drivers/hwmon/adt7462.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/adt7462.c b/drivers/hwmon/adt7462.c
index 9632e2e3c4bb..319a0519ebdb 100644
--- a/drivers/hwmon/adt7462.c
+++ b/drivers/hwmon/adt7462.c
@@ -413,7 +413,7 @@ static int ADT7462_REG_VOLT(struct adt7462_data *data, int which)
 			return 0x95;
-	return -ENODEV;
+	return 0;
 /* Provide labels for sysfs */

             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03 10:16 Dan Carpenter [this message]
2020-03-03 15:20 ` Darrick J. Wong

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200303101608.kqjwfcazu2ylhi2a@kili.mountain \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Hwmon Archive on

Archives are clonable:
	git clone --mirror 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/ \
	public-inbox-index linux-hwmon

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone