diff --git a/drivers/net/rpmsgdrv.c b/drivers/net/rpmsgdrv.c index 33309d1c7ba9f..b8cf19a6f0831 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; }