Re: [PATCH v2 4/4] software node: pin remote endpoint swnode

From: Andy Shevchenko

Date: Mon Nov 09 2026 - 16:14:53 EST


On Fri, Nov 06, 2026 at 12:38:38PM +0800, Peng Fan (OSS) wrote:
>
> software_node_graph_get_remote_endpoint() looks up the referenced node
> with software_node_fwnode() and then takes a reference with
> software_node_get(). The borrowed pointer can be released in between.
>
> Use software_node_to_swnode_get() directly and return the fwnode with
> the acquired reference retained.

...

> software_node_graph_get_remote_endpoint(const struct fwnode_handle *fwnode)
> {
> struct swnode *swnode = to_swnode(fwnode);
> const struct software_node_ref_args *ref;
> + struct swnode *remote;
> const struct property_entry *prop;

Prevent reversed xmas tree order.

--
With Best Regards,
Andy Shevchenko