Re: [PATCH v3 03/10] software node: allow referencing firmware nodes

Bartosz Golaszewski
2025-10-29T12:55:44Z

On Wed, Oct 29, 2025 at 1:51 PM Philipp Zabel <p.zabel@pengutronix.de> wrote:
>
> > @@ -535,7 +535,13 @@ software_node_get_reference_args(const struct fwnode_handle *fwnode,
> > ref_array = prop->pointer;
> > ref = &ref_array[index];
> >
> > - refnode = software_node_fwnode(ref->node);
> > + if (ref->swnode)
> > + refnode = software_node_fwnode(ref->swnode);
>
> software_node_fwnode(ref->swnode) never returns NULL if given a non-
> NULL parameter.
>

That's not true, it *will* return NULL if the software node in
question has not yet been registered with the fwnode framework.

Bart