aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorCamel Guo <camel.guo@axis.com>2022-04-25 12:00:19 +0200
committerGuenter Roeck <linux@roeck-us.net>2022-05-20 10:57:05 -0700
commit8c099cd381aa36373593d4efc92493c1345c73da (patch)
treeb5fad2054e0416cb0009953fc49f8b9eef2444a1 /drivers/hwmon
parenthwmon: (pmbus/max16601) Add MAX16602 support (diff)
downloadlinux-dev-8c099cd381aa36373593d4efc92493c1345c73da.tar.xz
linux-dev-8c099cd381aa36373593d4efc92493c1345c73da.zip
hwmon: (tmp401) Fix incorrect return value of tmp401_init_client
When ti,n-factor, ti,beta-compentation are not defined in devicetree, of_property_read_u32|s32 returns -EINVAL. In this case, tmp401_init_client should return 0 instead of simply pass ret to its caller. Signed-off-by: Camel Guo <camel.guo@axis.com> Link: https://lore.kernel.org/r/20220425100019.562781-1-camel.guo@axis.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/tmp401.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/tmp401.c b/drivers/hwmon/tmp401.c
index 63e53c8989a3..cc0a1c219b1f 100644
--- a/drivers/hwmon/tmp401.c
+++ b/drivers/hwmon/tmp401.c
@@ -604,7 +604,7 @@ static int tmp401_init_client(struct tmp401_data *data)
return ret;
}
- return ret;
+ return 0;
}
static int tmp401_detect(struct i2c_client *client,