[PATCH 01/34] alist: Mention the error condition in alist_add_placeholder()

Simon Glass sjg at chromium.org
Fri Oct 18 01:23:40 CEST 2024


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

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

 include/alist.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/alist.h b/include/alist.h
index 68d268f01af..0343946bc4a 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);
 
-- 
2.34.1



More information about the U-Boot mailing list