summaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorFrank Rowand <frank.rowand@sony.com>2017-10-18 01:36:32 +0200
committerRob Herring <robh@kernel.org>2017-10-18 03:47:56 +0200
commit34ca5d76f250d4ba98c4cdc069ab79b395f9ecac (patch)
tree55d0f821e8287f911f4083001dcacaa22569d30c /drivers/of
parentof: overlay: remove a dependency on device node full_name (diff)
downloadlinux-34ca5d76f250d4ba98c4cdc069ab79b395f9ecac.tar.xz
linux-34ca5d76f250d4ba98c4cdc069ab79b395f9ecac.zip
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>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/overlay.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index 0e9aefc1ff15..c99842bb4b09 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -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)))