Reword the function comment for clarity and correct the test for no
records.

Signed-off-by: Simon Glass <s...@chromium.org>
---

 boot/upl_write.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/boot/upl_write.c b/boot/upl_write.c
index 25ec6992573..b2e9ae85712 100644
--- a/boot/upl_write.c
+++ b/boot/upl_write.c
@@ -401,7 +401,7 @@ static int add_upl_memmap(const struct upl *upl, ofnode 
root)
 }
 
 /**
- * add_upl_memres() - Add /memory-reserved nodes to the tree
+ * add_upl_memres() - Add /reserved-memory nodes to the tree
  *
  * @upl: UPL state
  * @root: Parent node to contain the new node
@@ -413,7 +413,7 @@ static int add_upl_memres(const struct upl *upl, ofnode 
root,
        ofnode mem_node;
        int i, ret;
 
-       if (!upl->memmap.count)
+       if (!upl->memres.count)
                return 0;
        ret = ofnode_add_subnode(root, UPLN_MEMORY_RESERVED, &mem_node);
        if (ret) {
-- 
2.43.0

Reply via email to