From 179144a0d4128e7588b3d613a14807402f5e7c37 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Thu, 1 Sep 2011 08:34:31 -0700 Subject: 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 Reviewed-by: Robert Coulson --- drivers/hwmon/pmbus/max8688.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/hwmon/pmbus/max8688.c') 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: -- cgit