hwmon: (amc6821) Fix return value

Propagate return value obtained from i2c_smbus_read_byte_data()
instead of hardcoding.

Signed-off-by: Sachin Kamat <[email protected]>
Cc: T. Mertelj <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
This commit is contained in:
Sachin Kamat 2013-09-11 09:49:50 +05:30 • committed by Guenter Roeck
commit 3499e5b2e1

View file

@ -364,7 +364,7 @@ static ssize_t set_pwm1_enable(
if (config < 0) {
dev_err(&client->dev,
"Error reading configuration register, aborting.\n");
return -EIO;
return config;
}
switch (val) {
@ -665,7 +665,7 @@ static ssize_t set_fan1_div(
if (config < 0) {
dev_err(&client->dev,
"Error reading configuration register, aborting.\n");
return -EIO;
return config;
}
mutex_lock(&data->update_lock);
switch (val) {