You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "jpaali (via GitHub)" <gi...@apache.org> on 2023/09/19 10:48:06 UTC

[GitHub] [nuttx] jpaali opened a new pull request, #10713: drivers/net/rpmsgdrv.c: Take netdev_register() return value into account

jpaali opened a new pull request, #10713:
URL: https://github.com/apache/nuttx/pull/10713

   ## Summary
   
   net_rpmsg_drv_init() bypass return value of netdev_register(). This should be taken into account.
   
   ## Impact
   
   net_rpmsg_drv_init() returns negated errno in case of netdev_register() failure.
   
   ## Testing
   
   Custom MPFS board


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 merged pull request #10713: drivers/net/rpmsgdrv.c: Take netdev_register() return value into account

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #10713:
URL: https://github.com/apache/nuttx/pull/10713


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] jpaali commented on a diff in pull request #10713: drivers/net/rpmsgdrv.c: Take netdev_register() return value into account

Posted by "jpaali (via GitHub)" <gi...@apache.org>.
jpaali commented on code in PR #10713:
URL: https://github.com/apache/nuttx/pull/10713#discussion_r1331086556


##########
drivers/net/rpmsgdrv.c:
##########
@@ -1152,6 +1153,6 @@ int net_rpmsg_drv_init(FAR const char *cpuname,
 
   /* Register the device with the OS so that socket IOCTLs can be performed */
 
-  netdev_register(dev, lltype);
-  return OK;
+  ret = netdev_register(dev, lltype);

Review Comment:
   added little bit more error handling to init()



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] anchao commented on a diff in pull request #10713: drivers/net/rpmsgdrv.c: Take netdev_register() return value into account

Posted by "anchao (via GitHub)" <gi...@apache.org>.
anchao commented on code in PR #10713:
URL: https://github.com/apache/nuttx/pull/10713#discussion_r1330182091


##########
drivers/net/rpmsgdrv.c:
##########
@@ -1152,6 +1153,6 @@ int net_rpmsg_drv_init(FAR const char *cpuname,
 
   /* Register the device with the OS so that socket IOCTLs can be performed */
 
-  netdev_register(dev, lltype);
-  return OK;
+  ret = netdev_register(dev, lltype);

Review Comment:
   free priv and unregister rpmsg callback before return



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org