hwmon: (tmp421) Fix return value

Propagate return value obtained from i2c_smbus_read_byte_data()
instead of hardcoding.

Signed-off-by: Sachin Kamat <[email protected]>
Cc: Andre Prendel <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
This commit is contained in:
Sachin Kamat 2013-09-11 09:49:52 +05:30 • committed by Guenter Roeck
commit 010a166a52

View file

@ -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;