Skip to content

Commit

Permalink
hwmon: (pmbus/max8688) Accept negative page register values
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
groeck committed Mar 11, 2018
1 parent 91ab883 commit a46f8cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/pmbus/max8688.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a46f8cd

Please sign in to comment.