blob: be6ad3bc444b7ef4fec8fab1be1439a76a069ef4 [file] [log] [blame]
From e60fb90755808ec28a90c15c29b4e919b63b3cb1 Mon Sep 17 00:00:00 2001
From: Frank Rowand <frank.rowand@sony.com>
Date: Tue, 17 Oct 2017 16:36:32 -0700
Subject: [PATCH 0916/1795] 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>
(cherry picked from commit 34ca5d76f250d4ba98c4cdc069ab79b395f9ecac)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/of/overlay.c | 2 --
1 file changed, 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)))
--
2.19.0