|
@@ -837,8 +837,10 @@ struct pmf_function *__pmf_find_function(struct device_node *target,
|
|
return NULL;
|
|
return NULL;
|
|
find_it:
|
|
find_it:
|
|
dev = pmf_find_device(actor);
|
|
dev = pmf_find_device(actor);
|
|
- if (dev == NULL)
|
|
|
|
- return NULL;
|
|
|
|
|
|
+ if (dev == NULL) {
|
|
|
|
+ result = NULL;
|
|
|
|
+ goto out;
|
|
|
|
+ }
|
|
|
|
|
|
list_for_each_entry(func, &dev->functions, link) {
|
|
list_for_each_entry(func, &dev->functions, link) {
|
|
if (name && strcmp(name, func->name))
|
|
if (name && strcmp(name, func->name))
|
|
@@ -850,8 +852,9 @@ struct pmf_function *__pmf_find_function(struct device_node *target,
|
|
result = func;
|
|
result = func;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
- of_node_put(actor);
|
|
|
|
pmf_put_device(dev);
|
|
pmf_put_device(dev);
|
|
|
|
+out:
|
|
|
|
+ of_node_put(actor);
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|