Skip to content

Commit 68f70a8

Browse files
groeckgregkh
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 92a1e6a commit 68f70a8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hwmon/pmbus/max8688.c

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

47-
if (page)
47+
if (page > 0)
4848
return -ENXIO;
4949

5050
switch (reg) {

0 commit comments

Comments
 (0)