Skip to content

Commit dbda116

Browse files
committed
lib: pdn: doc: Clarify function return values
Expand on the return values of callback reg/dereg functions. Signed-off-by: Håvard Vermeer <[email protected]>
1 parent edc4bd9 commit dbda116

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

include/modem/pdn.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,9 @@ int pdn_default_apn_get(char *buf, size_t len);
262262
*
263263
* @param cb The PDN event handler.
264264
*
265-
* @return int Zero on success or a negative errno otherwise.
265+
* @retval 0 Callback registered successfully, or the callback is already registered.
266+
* @retval -EFAULT The provided cb parameter was \c NULL.
267+
* @retval -ENOMEM Insufficient heap to allocate the PDP context.
266268
*/
267269
int pdn_default_ctx_cb_reg(pdn_event_handler_t cb);
268270

@@ -271,7 +273,10 @@ int pdn_default_ctx_cb_reg(pdn_event_handler_t cb);
271273
*
272274
* @param cb The PDN event handler.
273275
*
274-
* @return int Zero on success or a negative errno otherwise.
276+
* @retval 0 Callback deregistered successfully.
277+
* @retval -EFAULT The provided cb parameter was \c NULL.
278+
* @retval -EINVAL PDP context with the provided callback was not found. This can be returned if
279+
* the callback was not registered upon calling this function.
275280
*/
276281
int pdn_default_ctx_cb_dereg(pdn_event_handler_t cb);
277282

0 commit comments

Comments
 (0)