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

From: Bartosz Golaszewski

Date: Wed Oct 29 2025 - 08:55:44 EST


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.

Bart