dm: core: Support writing a property to an empty node

At present this does not work with livetree. Fix it and add a test.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2022-09-06 20:27:03 -06:00
committed by Tom Rini
parent ffe9039249
commit c3a194dec9
2 changed files with 7 additions and 4 deletions

View File

@@ -672,6 +672,9 @@ static int dm_test_ofnode_add_subnode(struct unit_test_state *uts)
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,