diff options
Diffstat (limited to 'drivers/hwmon/pmbus/max34440.c')
-rw-r--r-- | drivers/hwmon/pmbus/max34440.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/hwmon/pmbus/max34440.c b/drivers/hwmon/pmbus/max34440.c index c824365e4aa4..beaf5a8d9c45 100644 --- a/drivers/hwmon/pmbus/max34440.c +++ b/drivers/hwmon/pmbus/max34440.c @@ -93,12 +93,14 @@ static int max34440_write_word_data(struct i2c_client *client, int page, static int max34440_read_byte_data(struct i2c_client *client, int page, int reg) { - int ret; + int ret = 0; int mfg_status; - ret = pmbus_set_page(client, page); - if (ret < 0) - return ret; + if (page >= 0) { + ret = pmbus_set_page(client, page); + if (ret < 0) + return ret; + } switch (reg) { case PMBUS_STATUS_IOUT: |