diff options
Diffstat (limited to 'drivers/hwmon/pmbus/ucd9000.c')
-rw-r--r-- | drivers/hwmon/pmbus/ucd9000.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/hwmon/pmbus/ucd9000.c b/drivers/hwmon/pmbus/ucd9000.c index d0ddb60155c..4ff6cf289f8 100644 --- a/drivers/hwmon/pmbus/ucd9000.c +++ b/drivers/hwmon/pmbus/ucd9000.c @@ -74,8 +74,8 @@ 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; + if (page > 0) + return -ENXIO; ret = ucd9000_get_fan_config(client, 0); if (ret < 0) @@ -88,8 +88,8 @@ static int ucd9000_read_byte_data(struct i2c_client *client, int page, int reg) ret = fan_config; break; case PMBUS_FAN_CONFIG_34: - if (page) - return -EINVAL; + if (page > 0) + return -ENXIO; ret = ucd9000_get_fan_config(client, 2); if (ret < 0) @@ -239,13 +239,12 @@ out: static int ucd9000_remove(struct i2c_client *client) { - int ret; struct ucd9000_data *data; data = to_ucd9000_data(pmbus_get_driver_info(client)); - ret = pmbus_do_remove(client); + pmbus_do_remove(client); kfree(data); - return ret; + return 0; } |