Commit fd25ffdf authored by Frank Rowand's avatar Frank Rowand Committed by Rob Herring
Browse files

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: default avatarFrank Rowand <frank.rowand@sony.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 36c79bc7
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1116,11 +1116,14 @@ 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);
		}
	}
}

/**
 *	attach_node_and_children - attaches nodes