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>
This commit is contained in:
Simon Glass
2024-10-19 09:21:41 -06:00
parent e61ea9f2e5
commit a8c07ac497

View File

@@ -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);