summaryrefslogtreecommitdiff
path: root/drivers/of
diff options
context:
space:
mode:
authorFrank Rowand <frank.rowand@sony.com>2019-01-25 02:22:13 +0300
committerRob Herring <robh@kernel.org>2019-02-13 21:12:53 +0300
commitfd25ffdfd0b520f25d5c532e962dfc20d58cf4f5 (patch)
tree9a29da13ed503b626aec40d37c8501d392e14e8d /drivers/of
parent36c79bc7ef792e8f5e0cc0eb012ad21a7981e908 (diff)
downloadlinux-fd25ffdfd0b520f25d5c532e962dfc20d58cf4f5.tar.xz
of: unittest: remove report of expected error
update_node_properties() reports an error when the test data contains a node (such as "/aliases") that already exists in the base devicetree. The error is caused by of_fdt_unflatten_tree() autogenerating the "name" property, thus both the existing node and the new node will have a property with the same name. Suppress reporting the known error. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/unittest.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 84427384654d..3249fe259d30 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -1116,9 +1116,12 @@ static void update_node_properties(struct device_node *np,
for (prop = np->properties; prop != NULL; prop = save_next) {
save_next = prop->next;
ret = of_add_property(dup, prop);
- if (ret)
+ if (ret) {
+ if (ret == -EEXIST && !strcmp(prop->name, "name"))
+ continue;
pr_err("unittest internal error: unable to add testdata property %pOF/%s",
np, prop->name);
+ }
}
}