]> git.baikalelectronics.ru Git - kernel.git/commit
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>
Thu, 12 Mar 2020 12:00:30 +0000 (13:00 +0100)
commitc1e453655f380ba127792079d9f59130762ab52f
tree3197b75a9b0cb627ad2d3ffef4dfcdfee84b4f1d
parentb5c9445bd8e43bed5ffc1c467cf907ac6dd9594d
hwmon: (adt7462) Fix an error return in ADT7462_REG_VOLT()

commit 218408b9588f6977eaab3c70858b88c1c56e59fc 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
5aa6bf3cfa5c ("hwmon: (adt7462) ADT7462_REG_VOLT_MAX() should return 0")
but I missed this one.

Fixes: baf690310e90 ("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