drivers/net/rpmsgdrv.c: Take netdev_register() return value into account

Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
This commit is contained in:
Jani Paalijarvi 2022-09-27 09:49:07 +03:00 committed by Xiang Xiao
parent 0a2c79034f
commit 999970b820
1 changed files with 3 additions and 2 deletions

View File

@ -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;
}