Skip to content

Commit 3e4dd2e

Browse files
Krzysztof Adamskigroeck
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/8e9e332b18dc2cf545f8e8255157e408d356f916.1634206677.git.krzysztof.adamski@nokia.com Signed-off-by: Guenter Roeck <[email protected]>
1 parent 0ebbd89 commit 3e4dd2e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/hwmon/tmp421.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,9 @@ static int tmp421_probe_from_dt(struct i2c_client *client, struct tmp421_data *d
414414
int err;
415415

416416
for_each_child_of_node(np, child) {
417+
if (strcmp(child->name, "channel"))
418+
continue;
419+
417420
err = tmp421_probe_child_from_dt(client, child, data);
418421
if (err)
419422
return err;

0 commit comments

Comments
 (0)