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>
This commit is contained in:
Camel Guo 2022-04-25 12:00:19 +02:00 committed by Guenter Roeck
parent e5c498ccc9
commit 8c099cd381

View File

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