From: Simon Glass <sjg@chromium.org>
Date: Sat, 19 Oct 2024 15:21:41 +0000 (-0600)
Subject: alist: Mention the error condition in alist_add_placeholder()
X-Git-Tag: v2025.01-rc5-pxa1908~152^2~27
X-Git-Url: http://git.dujemihanovic.xyz/img/static/%7B%7B%20%24.Site.BaseURL%20%7D%7Dposts/static/gitweb.css?a=commitdiff_plain;h=805e89e3f7fe5118374b5005e5c2dc214185dcac;p=u-boot.git

alist: Mention the error condition in alist_add_placeholder()

Update the function comment to note that this function can return NULL
if it runs out of memory.

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

diff --git a/include/alist.h b/include/alist.h
index 68d268f01a..0343946bc4 100644
--- a/include/alist.h
+++ b/include/alist.h
@@ -151,8 +151,9 @@ void *alist_ensure_ptr(struct alist *lst, uint index);
  * alist_add_placeholder() - Add a new item to the end of the list
  *
  * @lst: alist to add to
- * Return: Pointer to the newly added position. Note that this is not inited so
- * the caller must copy the requested struct to the returned pointer
+ * Return: Pointer to the newly added position, or NULL if out of memory. Note
+ * that this is not inited so the caller must copy the requested struct to the
+ * returned pointer
  */
 void *alist_add_placeholder(struct alist *lst);