[PATCH v2 2/7] of: property: fw_devlink: Report unsupported supplier linking

From: Ernest Van Hoecke

Date: Thu Sep 10 2026 - 10:41:28 EST


From: Ernest Van Hoecke <ernest.vanhoecke@xxxxxxxxxxx>

OF supplier linking is deliberately disabled on OLPC and Intel CE4100
systems. The add_links operation currently returns zero on these systems,
so callers cannot distinguish unsupported linking from success.

Return -EOPNOTSUPP when supplier linking is unsupported. This allows OF
unit tests to skip link assertions on these systems without exposing the
private platform-support predicate.

The driver core ignores the add_links return value and marks the fwnode
as processed regardless, so its link creation and retry behavior remain
unchanged.

Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@xxxxxxxxxxx>
---
drivers/of/property.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/property.c b/drivers/of/property.c
index 380df0861ab9..eba7e9fe6c38 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1691,7 +1691,7 @@ static int of_fwnode_add_links(struct fwnode_handle *fwnode)
struct device_node *con_np = to_of_node(fwnode);

if (!of_is_fwnode_add_links_supported())
- return 0;
+ return -EOPNOTSUPP;

if (!con_np)
return -EINVAL;

--
2.43.0