Commit 3e4dd2e8 authored by Krzysztof Adamski's avatar Krzysztof Adamski Committed by Guenter Roeck
Browse files

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: default avatarKrzysztof Adamski <krzysztof.adamski@nokia.com>
Link: https://lore.kernel.org/r/8e9e332b18dc2cf545f8e8255157e408d356f916.1634206677.git.krzysztof.adamski@nokia.com


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 0ebbd89d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;