Skip to content

Commit

Permalink
hwmon: (tmp421) 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: Andre Prendel <andre.prendel@gmx.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Sachin Kamat authored and Guenter Roeck committed Sep 11, 2013
1 parent 17a5210 commit 010a166
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/tmp421.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 010a166

Please sign in to comment.