From: James Hilliard <james.hilliard1@gmail.com>
To: Rob Herring <robh@kernel.org>,
Saravana Kannan <saravanak@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
Christian Marangi <ansuelsmth@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
driver-core@lists.linux.dev, netdev@vger.kernel.org,
James Hilliard <james.hilliard1@gmail.com>
Subject: [PATCH net-next v2 1/4] of: property: skip links without a consumer node
Date: Sun, 16 Aug 2026 18:00:28 -0600 [thread overview]
Message-ID: <20260816-submit-phy-package-fwdevlink-v1-v2-1-23e55dd59fad@gmail.com> (raw)
In-Reply-To: <20260816-submit-phy-package-fwdevlink-v1-v2-0-23e55dd59fad@gmail.com>
Supplier bindings can map a property node to the device node which
consumes the referenced resource. The remote-endpoint binding uses
of_graph_get_port_parent(), which can return NULL for a malformed graph
node without its expected parents.
of_link_property() currently passes that NULL node through to
fwnode_link_add(), which dereferences the consumer while adding the
link.
Only create the link when the binding resolved a consumer node. A
malformed graph property then creates no dependency instead of crashing
while fw_devlink parses the tree.
Fixes: f7514a663016 ("of: property: fw_devlink: Add support for remote-endpoint")
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
drivers/of/property.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/of/property.c b/drivers/of/property.c
index 72cf12907de0..38c0c7dc428a 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1620,7 +1620,9 @@ static int of_link_property(struct device_node *con_np, const char *prop_name)
matched = true;
i++;
- of_link_to_phandle(con_dev_np, phandle, s->fwlink_flags);
+ if (con_dev_np)
+ of_link_to_phandle(con_dev_np, phandle,
+ s->fwlink_flags);
of_node_put(phandle);
}
s++;
--
2.53.0
next prev parent reply other threads:[~2026-08-17 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-17 0:00 [PATCH net-next v2 0/4] of: mdio: fix fw_devlink for Ethernet PHY packages James Hilliard
2026-08-17 0:00 ` James Hilliard [this message]
2026-08-17 0:00 ` [PATCH net-next v2 2/4] driver core: factor sync-state-only link cleanup James Hilliard
2026-08-17 0:00 ` [PATCH net-next v2 3/4] of: property: link PHY package suppliers to member PHYs James Hilliard
2026-08-17 0:00 ` [PATCH net-next v2 4/4] net: mdio: release fw_devlink proxies after population James Hilliard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260816-submit-phy-package-fwdevlink-v1-v2-1-23e55dd59fad@gmail.com \
--to=james.hilliard1@gmail.com \
--cc=andrew@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=dakr@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=saravanak@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox