diff --git a/drivers/base/property.c b/drivers/base/property.c index d0960a9e8974..b7b3a7b86006 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c @@ -1158,8 +1158,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);