You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2023/08/30 09:27:47 UTC

[nuttx] branch master updated: net/can: correct the return value if unsupported socket type

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 3cbf13dd1d net/can: correct the return value if unsupported socket type
3cbf13dd1d is described below

commit 3cbf13dd1da0163ed6c7e4f69dedebefd1620866
Author: chao an <an...@xiaomi.com>
AuthorDate: Wed Aug 30 14:40:34 2023 +0800

    net/can: correct the return value if unsupported socket type
    
    Signed-off-by: chao an <an...@xiaomi.com>
---
 net/can/can_recvmsg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/can/can_recvmsg.c b/net/can/can_recvmsg.c
index 66639d42ee..5280909287 100644
--- a/net/can/can_recvmsg.c
+++ b/net/can/can_recvmsg.c
@@ -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();