hwmon: (adt7462) Fix an error return in ADT7462_REG_VOLT()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 3 Mar 2020 10:16:08 +0000 (13:16 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Mar 2020 06:53:13 +0000 (07:53 +0100)
commit367a1fd259a87bf703baa025d20b8196c97be7ac
tree7e839b5f8a88c853f1f1bda3c910ac043210d7e6
parent7ed93bd0360ebe3f1c0bd1fe991e9f2e852fbc68
hwmon: (adt7462) Fix an error return in ADT7462_REG_VOLT()

commit 44f2f882909fedfc3a56e4b90026910456019743 upstream.

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 <dan.carpenter@oracle.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Link: https://lore.kernel.org/r/20200303101608.kqjwfcazu2ylhi2a@kili.mountain
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/adt7462.c