summaryrefslogtreecommitdiff
path: root/drivers/hwmon/pmbus/max8688.c
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2011-09-01 19:34:31 +0400
committerGuenter Roeck <guenter.roeck@ericsson.com>2011-10-24 22:09:39 +0400
commit179144a0d4128e7588b3d613a14807402f5e7c37 (patch)
tree996869256838ba759495d1a1331ffcddba94b1bd /drivers/hwmon/pmbus/max8688.c
parentced29d422557feb4230ea6b0067f1e24c5bd83f7 (diff)
downloadlinux-179144a0d4128e7588b3d613a14807402f5e7c37.tar.xz
hwmon: (pmbus) Replace EINVAL return codes with more appropriate errors
EINVAL was over-used in the code. Replace it with more appropriate errors. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
Diffstat (limited to 'drivers/hwmon/pmbus/max8688.c')
-rw-r--r--drivers/hwmon/pmbus/max8688.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/pmbus/max8688.c b/drivers/hwmon/pmbus/max8688.c
index e148e2c5a756..7113f1131e4a 100644
--- a/drivers/hwmon/pmbus/max8688.c
+++ b/drivers/hwmon/pmbus/max8688.c
@@ -45,7 +45,7 @@ static int max8688_read_word_data(struct i2c_client *client, int page, int reg)
int ret;
if (page)
- return -EINVAL;
+ return -ENXIO;
switch (reg) {
case PMBUS_VIRT_READ_VOUT_MAX:
@@ -102,7 +102,7 @@ static int max8688_read_byte_data(struct i2c_client *client, int page, int reg)
int mfg_status;
if (page)
- return -EINVAL;
+ return -ENXIO;
switch (reg) {
case PMBUS_STATUS_VOUT: