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>
This commit is contained in:
Guenter Roeck
2011-09-01 08:34:31 -07:00
parent ced29d4225
commit 179144a0d4
4 changed files with 13 additions and 13 deletions

View File

@@ -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: