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

Philipp Zabel
2025-10-29T13:16:22Z

On Mi, 2025-10-29 at 13:55 +0100, Bartosz Golaszewski wrote:
> 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.

I completely missed the list lookup in software_node_to_swnode().
Thank you for the quick correction and additional context.

regards
Philipp