From 28a2b2f7692a9348b72c468ecda99ad9408714e8 Mon Sep 17 00:00:00 2001 From: Jani Paalijarvi Date: Tue, 27 Sep 2022 09:49:07 +0300 Subject: [PATCH] drivers/net/rpmsgdrv.c: Take netdev_register() return value into account Signed-off-by: Jani Paalijarvi --- 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 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; }