[PATCH] of: do not copy properties if they already exist in the destination
Jonas Richardsen
jonasrichardsen at emlix.com
Mon Apr 15 01:14:54 PDT 2024
---
drivers/of/base.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/of/base.c b/drivers/of/base.c
index b22959dabe..9bb4ae13db 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -2346,6 +2346,9 @@ struct property *of_copy_property(const struct device_node *src,
if (!prop)
return NULL;
+ if (of_find_property(dst, propname, NULL))
+ return ERR_PTR(-EEXIST);
+
return of_new_property(dst, propname,
of_property_get_value(prop), prop->length);
}
--
2.42.0
More information about the barebox
mailing list