diff options
Diffstat (limited to 'drivers/base/swnode.c')
-rw-r--r-- | drivers/base/swnode.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c index ef1a48fec718..2d925fc2255f 100644 --- a/drivers/base/swnode.c +++ b/drivers/base/swnode.c | |||
@@ -546,17 +546,13 @@ software_node_get_named_child_node(const struct fwnode_handle *fwnode, | |||
546 | const char *childname) | 546 | const char *childname) |
547 | { | 547 | { |
548 | struct swnode *swnode = to_swnode(fwnode); | 548 | struct swnode *swnode = to_swnode(fwnode); |
549 | const struct property_entry *prop; | ||
550 | struct swnode *child; | 549 | struct swnode *child; |
551 | 550 | ||
552 | if (!swnode || list_empty(&swnode->children)) | 551 | if (!swnode || list_empty(&swnode->children)) |
553 | return NULL; | 552 | return NULL; |
554 | 553 | ||
555 | list_for_each_entry(child, &swnode->children, entry) { | 554 | list_for_each_entry(child, &swnode->children, entry) { |
556 | prop = property_entry_get(child->node->properties, "name"); | 555 | if (!strcmp(childname, kobject_name(&child->kobj))) { |
557 | if (!prop) | ||
558 | continue; | ||
559 | if (!strcmp(childname, prop->value.str)) { | ||
560 | kobject_get(&child->kobj); | 556 | kobject_get(&child->kobj); |
561 | return &child->fwnode; | 557 | return &child->fwnode; |
562 | } | 558 | } |