Re: [PATCH v3 03/10] software node: allow referencing firmware nodes
From: Philipp Zabel
Date: Wed Oct 29 2025 - 09:16:20 EST
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@xxxxxxxxxxxxxx> 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