lkml.org 
[lkml]   [2017]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 12/12] of: overlay: remove unneeded check for NULL kbasename()
Date
From: Frank Rowand <frank.rowand@sony.com>

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>
---
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)))
--
Frank Rowand <frank.rowand@sony.com>
\
 
 \ /
  Last update: 2017-10-22 17:06    [W:0.069 / U:3.280 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site