Skip to content

Commit

Permalink
of: overlay: remove unneeded check for NULL kbasename()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Rob Herring <[email protected]>
  • Loading branch information
frowand authored and robherring committed Oct 18, 2017
1 parent e0a58f3 commit 34ca5d7
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/of/overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit 34ca5d7

Please sign in to comment.