summaryrefslogtreecommitdiffstats
path: root/common/oftree.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/oftree.c')
-rw-r--r--common/oftree.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/oftree.c b/common/oftree.c
index 09cb660212..36906e86fc 100644
--- a/common/oftree.c
+++ b/common/oftree.c
@@ -151,6 +151,10 @@ static int of_fixup_bootargs(struct device_node *root, void *unused)
if (!str)
return 0;
+ str = skip_spaces(str);
+ if (strlen(str) == 0)
+ return 0;
+
node = of_create_node(root, "/chosen");
if (!node)
return -ENOMEM;