summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pmbus/max8688.c
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2011-09-01 17:34:31 +0200
committerGuenter Roeck <guenter.roeck@ericsson.com>2011-10-24 20:09:39 +0200
commit179144a0d4128e7588b3d613a14807402f5e7c37 (patch)
tree996869256838ba759495d1a1331ffcddba94b1bd /drivers/hwmon/pmbus/max8688.c
parenthwmon: (pmbus) Provide more documentation (diff)
downloadlinux-179144a0d4128e7588b3d613a14807402f5e7c37.tar.xz
linux-179144a0d4128e7588b3d613a14807402f5e7c37.zip
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: