aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2014-02-12 00:34:21 -0500
committerGuenter Roeck <linux@roeck-us.net>2014-03-03 11:01:04 -0500
commit9bf3babf3f6e70723528bece564c57d38d534652 (patch)
treeef59f7be88d0ad496ce238fee094cf1849e6a7ba
parentf44e5c5cf9303daac57be0aa01bc0e8f29f1b9bd (diff)
hwmon: (emc2103) Return error from i2c_smbus_read_byte_data
There is no reason to replace one error with another. smatch message: drivers/hwmon/emc2103.c:352 set_fan_div() info: why not propagate 'status' from i2c_smbus_read_byte_data() instead of (-5)? Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--drivers/hwmon/emc2103.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/emc2103.c b/drivers/hwmon/emc2103.c
index 2c137b26acb4..fd892dd48e4c 100644
--- a/drivers/hwmon/emc2103.c
+++ b/drivers/hwmon/emc2103.c
@@ -349,7 +349,7 @@ static ssize_t set_fan_div(struct device *dev, struct device_attribute *da,
349 dev_dbg(&client->dev, "reg 0x%02x, err %d\n", 349 dev_dbg(&client->dev, "reg 0x%02x, err %d\n",
350 REG_FAN_CONF1, status); 350 REG_FAN_CONF1, status);
351 mutex_unlock(&data->update_lock); 351 mutex_unlock(&data->update_lock);
352 return -EIO; 352 return status;
353 } 353 }
354 status &= 0x9F; 354 status &= 0x9F;
355 status |= (new_range_bits << 5); 355 status |= (new_range_bits << 5);