Explorar o código

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>
Sachin Kamat %!s(int64=12) %!d(string=hai) anos
pai
achega
010a166a52
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/hwmon/tmp421.c

+ 1 - 1
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;