net/can: correct the return value if unsupported socket type

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an 2023-08-30 14:40:34 +08:00 committed by Petro Karashchenko
parent 664927c86e
commit 3cbf13dd1d

View File

@ -480,7 +480,7 @@ ssize_t can_recvmsg(FAR struct socket *psock, FAR struct msghdr *msg,
if (psock->s_type != SOCK_RAW)
{
nerr("ERROR: Unsupported socket type: %d\n", psock->s_type);
ret = -ENOSYS;
return -ENOSYS;
}
net_lock();