Skip to content

Commit

Permalink
hwmon: (amc6821) Fix return value
Browse files Browse the repository at this point in the history
Propagate return value obtained from i2c_smbus_read_byte_data()
instead of hardcoding.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: T. Mertelj <tomaz.mertelj@guest.arnes.si>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Sachin Kamat authored and Guenter Roeck committed Sep 11, 2013
1 parent 12ca0b5 commit 3499e5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hwmon/amc6821.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 3499e5b

Please sign in to comment.