net/can: correct the return value if unsupported socket type
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
parent
664927c86e
commit
3cbf13dd1d
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user