summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/tmp421.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-09-11 06:19:52 +0200
committerGuenter Roeck <linux@roeck-us.net>2013-09-11 22:01:41 +0200
commit010a166a5202f6297e196624a0671c4815032e38 (patch)
tree6288f8a7c035ff17a3d8e465c65d00b505ff6134 /drivers/hwmon/tmp421.c
parenthwmon: (amc6821) Remove redundant break (diff)
downloadlinux-010a166a5202f6297e196624a0671c4815032e38.tar.xz
linux-010a166a5202f6297e196624a0671c4815032e38.zip
hwmon: (tmp421) 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: Andre Prendel <andre.prendel@gmx.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/tmp421.c')
-rw-r--r--drivers/hwmon/tmp421.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/tmp421.c b/drivers/hwmon/tmp421.c
index 964c1d688274..ae26b06fa819 100644
--- a/drivers/hwmon/tmp421.c
+++ b/drivers/hwmon/tmp421.c
@@ -210,7 +210,7 @@ static int tmp421_init_client(struct i2c_client *client)
if (config < 0) {
dev_err(&client->dev,
"Could not read configuration register (%d)\n", config);
- return -ENODEV;
+ return config;
}
config_orig = config;