Message ID | 20211201125934.936953-2-sakari.ailus@linux.intel.com |
---|---|
State | Accepted |
Commit | 4a7f4110f79163fd53ea65438041994ed615e3af |
Headers | show |
Series | [v2,1/7] device property: Fix fwnode_graph_devcon_match() fwnode leak | expand |
diff --git a/drivers/base/property.c b/drivers/base/property.c index f1f35b48ab8b9..6df99e526ab0f 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c @@ -1206,8 +1206,10 @@ fwnode_graph_devcon_match(struct fwnode_handle *fwnode, const char *con_id, fwnode_graph_for_each_endpoint(fwnode, ep) { node = fwnode_graph_get_remote_port_parent(ep); - if (!fwnode_device_is_available(node)) + if (!fwnode_device_is_available(node)) { + fwnode_handle_put(node); continue; + } ret = match(node, con_id, data); fwnode_handle_put(node);