From dbda116ae2763e1d15d88b476a36df5fa6aa56a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Vermeer?= Date: Mon, 16 Dec 2024 12:17:54 +0100 Subject: [PATCH] lib: pdn: doc: Clarify function return values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Expand on the return values of callback reg/dereg functions. Signed-off-by: HÃ¥vard Vermeer --- include/modem/pdn.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/modem/pdn.h b/include/modem/pdn.h index 4c9719ba7c84..28193535e0ce 100644 --- a/include/modem/pdn.h +++ b/include/modem/pdn.h @@ -262,7 +262,9 @@ int pdn_default_apn_get(char *buf, size_t len); * * @param cb The PDN event handler. * - * @return int Zero on success or a negative errno otherwise. + * @retval 0 Callback registered successfully, or the callback is already registered. + * @retval -EFAULT The provided cb parameter was \c NULL. + * @retval -ENOMEM Insufficient heap to allocate the PDP context. */ int pdn_default_ctx_cb_reg(pdn_event_handler_t cb); @@ -271,7 +273,10 @@ int pdn_default_ctx_cb_reg(pdn_event_handler_t cb); * * @param cb The PDN event handler. * - * @return int Zero on success or a negative errno otherwise. + * @retval 0 Callback deregistered successfully. + * @retval -EFAULT The provided cb parameter was \c NULL. + * @retval -EINVAL PDP context with the provided callback was not found. This can be returned if + * the callback was not registered upon calling this function. */ int pdn_default_ctx_cb_dereg(pdn_event_handler_t cb);