Skip to content

Commit 26eef56

Browse files
groeckZhengShunQian
authored andcommitted
hwmon: (pmbus/max8688) Accept negative page register values
[ Upstream commit a46f8cd ] 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: da8e48a ("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>
1 parent 5304ac6 commit 26eef56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hwmon/pmbus/max8688.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static int max8688_read_word_data(struct i2c_client *client, int page, int reg)
4545
{
4646
int ret;
4747

48-
if (page)
48+
if (page > 0)
4949
return -ENXIO;
5050

5151
switch (reg) {

0 commit comments

Comments
 (0)