drivers: nsos: fix nsos_sendmsg() error code

There is a goto statement with conversion using errno_from_nsos_mid(). Use
NSOS_MID_ERRNO instead of ERRNO to return proper error code.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
This commit is contained in:
Marcin Niestroj 2024-05-07 14:55:40 +02:00 committed by David Leach
parent 3666b46b2e
commit 7cf49cc6f7

View file

@ -708,7 +708,7 @@ static ssize_t nsos_sendmsg(void *obj, const struct msghdr *msg, int flags)
msg_iov = k_calloc(msg->msg_iovlen, sizeof(*msg_iov));
if (!msg_iov) {
ret = -ENOMEM;
ret = -NSOS_MID_ENOMEM;
goto return_ret;
}