summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/pmbus/ucd9000.c
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2011-09-01 08:34:31 -0700
committerGuenter Roeck <guenter.roeck@ericsson.com>2011-10-24 11:09:39 -0700
commit179144a0d4128e7588b3d613a14807402f5e7c37 (patch)
tree996869256838ba759495d1a1331ffcddba94b1bd /drivers/hwmon/pmbus/ucd9000.c
parentced29d422557feb4230ea6b0067f1e24c5bd83f7 (diff)
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/ucd9000.c')
-rw-r--r--drivers/hwmon/pmbus/ucd9000.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/pmbus/ucd9000.c b/drivers/hwmon/pmbus/ucd9000.c
index 640a9c9de7f..1536db6543f 100644
--- a/drivers/hwmon/pmbus/ucd9000.c
+++ b/drivers/hwmon/pmbus/ucd9000.c
@@ -75,7 +75,7 @@ static int ucd9000_read_byte_data(struct i2c_client *client, int page, int reg)
switch (reg) {
case PMBUS_FAN_CONFIG_12:
if (page)
- return -EINVAL;
+ return -ENXIO;
ret = ucd9000_get_fan_config(client, 0);
if (ret < 0)
@@ -89,7 +89,7 @@ static int ucd9000_read_byte_data(struct i2c_client *client, int page, int reg)
break;
case PMBUS_FAN_CONFIG_34:
if (page)
- return -EINVAL;
+ return -ENXIO;
ret = ucd9000_get_fan_config(client, 2);
if (ret < 0)