of: overlay: remove unneeded check for NULL kbasename()

kbasename() will not return NULL if passed a valid string.  If
the parameter passed to kbasename() in this case is already NULL
then the devicetree has been corrupted.

Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
Frank Rowand 2017-10-17 16:36:32 -07:00 committed by Rob Herring
parent e0a58f3e08
commit 34ca5d76f2

View File

@ -331,8 +331,6 @@ static int add_changeset_node(struct overlay_changeset *ovcs,
int ret = 0;
node_kbasename = kbasename(node->full_name);
if (!node_kbasename)
return -ENOMEM;
for_each_child_of_node(target_node, tchild)
if (!of_node_cmp(node_kbasename, kbasename(tchild->full_name)))