1
0
Fork 0

hwmon: (pmbus/max8688) Accept negative page register values

[ Upstream commit a46f8cd696 ]

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: da8e48ab48 ("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>
pull/10/head
Guenter Roeck 2018-03-10 17:49:47 -08:00 committed by Greg Kroah-Hartman
parent 127b06ef52
commit afcbcb432e
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,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) {