net/pkt: Fix coverity issue

The value ret is overwritten after being assigned a value.

Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
This commit is contained in:
zhangshuai39 2025-05-15 11:02:18 +08:00 committed by Matteo Golin
parent 60b1cef84b
commit 49ffd94d84

View file

@ -499,7 +499,7 @@ ssize_t pkt_recvmsg(FAR struct socket *psock, FAR struct msghdr *msg,
if (psock->s_type != SOCK_DGRAM && psock->s_type != SOCK_RAW)
{
nerr("ERROR: Unsupported socket type: %d\n", psock->s_type);
ret = -ENOSYS;
return -ENOSYS;
}
/* Get the device driver that will service this transfer */