Skip to content

Commit

Permalink
hwmon: (pmbus/max8688) Accept negative page register values
Browse files Browse the repository at this point in the history
[ 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>
  • Loading branch information
groeck authored and gregkh committed May 30, 2018
1 parent 92a1e6a commit 68f70a8
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 @@ -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) {
Expand Down

0 comments on commit 68f70a8

Please sign in to comment.