From: Sachin Kamat Date: Wed, 11 Sep 2013 04:19:52 +0000 (+0530) Subject: hwmon: (tmp421) Fix return value X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=010a166a5202f6297e196624a0671c4815032e38;p=deliverable%2Flinux.git hwmon: (tmp421) Fix return value Propagate return value obtained from i2c_smbus_read_byte_data() instead of hardcoding. Signed-off-by: Sachin Kamat Cc: Andre Prendel Signed-off-by: Guenter Roeck --- 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;