diff options
author | Frank Rowand <frank.rowand@sony.com> | 2019-01-24 18:22:13 -0500 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2019-02-13 13:12:53 -0500 |
commit | fd25ffdfd0b520f25d5c532e962dfc20d58cf4f5 (patch) | |
tree | 9a29da13ed503b626aec40d37c8501d392e14e8d /drivers/of/unittest.c | |
parent | 36c79bc7ef792e8f5e0cc0eb012ad21a7981e908 (diff) |
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/unittest.c')
-rw-r--r-- | drivers/of/unittest.c | 5 |
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, | |||
1116 | for (prop = np->properties; prop != NULL; prop = save_next) { | 1116 | for (prop = np->properties; prop != NULL; prop = save_next) { |
1117 | save_next = prop->next; | 1117 | save_next = prop->next; |
1118 | ret = of_add_property(dup, prop); | 1118 | ret = of_add_property(dup, prop); |
1119 | if (ret) | 1119 | if (ret) { |
1120 | if (ret == -EEXIST && !strcmp(prop->name, "name")) | ||
1121 | continue; | ||
1120 | pr_err("unittest internal error: unable to add testdata property %pOF/%s", | 1122 | pr_err("unittest internal error: unable to add testdata property %pOF/%s", |
1121 | np, prop->name); | 1123 | np, prop->name); |
1124 | } | ||
1122 | } | 1125 | } |
1123 | } | 1126 | } |
1124 | 1127 | ||