Commit 0719a7b8 authored by Sachin Kamat's avatar Sachin Kamat Committed by Ben Hutchings

hwmon: (amc6821) Fix return value

commit 3499e5b2 upstream.

Propagate return value obtained from i2c_smbus_read_byte_data()
instead of hardcoding.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Cc: T. Mertelj <tomaz.mertelj@guest.arnes.si>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 48371f90
......@@ -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) {
......@@ -673,7 +673,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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment