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

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

commit 999970b820ec6588d1e3f4eb42458412397aed09
Author: Jani Paalijarvi <[email protected]>
AuthorDate: Tue Sep 27 09:49:07 2022 +0300

    drivers/net/rpmsgdrv.c: Take netdev_register() return value into account
    
    Signed-off-by: Jani Paalijarvi <[email protected]>
---
 drivers/net/rpmsgdrv.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/rpmsgdrv.c b/drivers/net/rpmsgdrv.c
index 33309d1c7b..b8cf19a6f0 100644
--- a/drivers/net/rpmsgdrv.c
+++ b/drivers/net/rpmsgdrv.c
@@ -1113,6 +1113,7 @@ int net_rpmsg_drv_init(FAR const char *cpuname,
 {
   FAR struct net_rpmsg_drv_s *priv;
   FAR struct net_driver_s *dev;
+  int ret;
 
   /* Allocate the interface structure */
 
@@ -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);
+  return ret;
 }

Reply via email to