At present this does not work with livetree. Fix it and add a test.
Signed-off-by: Simon Glass <sjg@chromium.org>
pp_last = pp;
}
- if (!pp_last)
- return -ENOENT;
-
/* Property does not exist -> append new property */
new = malloc(sizeof(struct property));
if (!new)
new->length = len;
new->next = NULL;
- pp_last->next = new;
+ if (pp_last)
+ pp_last->next = new;
+ else
+ np->properties = new;
return 0;
}
malloc_disable_testing();
}
+ /* write to the empty node */
+ ut_assertok(ofnode_write_string(subnode, "example", "text"));
+
return 0;
}
DM_TEST(dm_test_ofnode_add_subnode,