summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/amc6821.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-09-11 06:19:50 +0200
committerGuenter Roeck <linux@roeck-us.net>2013-09-11 22:01:40 +0200
commit3499e5b2e14b792fe411302fea3b6fcc4ba40ef2 (patch)
tree2f5091c35d0b628d20f5963757e41a448fcc7318 /drivers/hwmon/amc6821.c
parenthwmon: (ibmaem) Fix return value (diff)
downloadlinux-3499e5b2e14b792fe411302fea3b6fcc4ba40ef2.tar.xz
linux-3499e5b2e14b792fe411302fea3b6fcc4ba40ef2.zip
hwmon: (amc6821) Fix return value
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>
Diffstat (limited to 'drivers/hwmon/amc6821.c')
-rw-r--r--drivers/hwmon/amc6821.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/amc6821.c b/drivers/hwmon/amc6821.c
index 4fe49d2bfe1d..fcb18535fd56 100644
--- a/drivers/hwmon/amc6821.c
+++ b/drivers/hwmon/amc6821.c
@@ -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) {