Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2018-03-10 17:49:47 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-30 07:47:42 +0200
commit68f70a8a9ffa7dfd397027bfbe767810def1937f (patch)
treee7cb1187c2e2a9e209c9ea39ed939a6cb76825e1
parent92a1e6abe27539cd08263c81242bec2e8f4eeca7 (diff)
hwmon: (pmbus/max8688) Accept negative page register values
[ Upstream commit a46f8cd696624ef757be0311eb28f119c36778e8 ] A negative page register value means that no page needs to be selected. This is used by status register evaluations and needs to be accepted. Fixes: da8e48ab483e1 ("hwmon: (pmbus) Always call _pmbus_read_byte in core driver") Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/hwmon/pmbus/max8688.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/pmbus/max8688.c b/drivers/hwmon/pmbus/max8688.c
index f04454a42fdd..893df4dffae4 100644
--- a/drivers/hwmon/pmbus/max8688.c
+++ b/drivers/hwmon/pmbus/max8688.c
@@ -44,7 +44,7 @@ static int max8688_read_word_data(struct i2c_client *client, int page, int reg)
{
int ret;
- if (page)
+ if (page > 0)
return -ENXIO;
switch (reg) {