From: Krzysztof Adamski Date: Thu, 14 Oct 2021 13:11:02 +0000 (+0200) Subject: hwmon: (tmp421) ignore non-channel related DT nodes X-Git-Tag: v5.16-rc1~165^2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e4dd2e8bcf2780e5d421a5d9e833b6ac4e70b11;p=thirdparty%2Flinux.git hwmon: (tmp421) ignore non-channel related DT nodes In case the DT contains some nodes not describing the input channels, ignore them instead of exiting with error. Signed-off-by: Krzysztof Adamski Link: https://lore.kernel.org/r/8e9e332b18dc2cf545f8e8255157e408d356f916.1634206677.git.krzysztof.adamski@nokia.com Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/tmp421.c b/drivers/hwmon/tmp421.c index 277628e2a5103..31e95b5749c8b 100644 --- a/drivers/hwmon/tmp421.c +++ b/drivers/hwmon/tmp421.c @@ -414,6 +414,9 @@ static int tmp421_probe_from_dt(struct i2c_client *client, struct tmp421_data *d int err; for_each_child_of_node(np, child) { + if (strcmp(child->name, "channel")) + continue; + err = tmp421_probe_child_from_dt(client, child, data); if (err) return err;