From 298f16fee786f798bf77de7f3f25092b3b784d6f Mon Sep 17 00:00:00 2001 From: Jose Alamos Date: Thu, 30 Sep 2021 10:47:26 +0200 Subject: [PATCH] net/gomach: adapt ops->init to handle driver initialization --- sys/net/gnrc/link_layer/gomach/gomach.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/net/gnrc/link_layer/gomach/gomach.c b/sys/net/gnrc/link_layer/gomach/gomach.c index 1c119e8e30..cf2364a2c2 100644 --- a/sys/net/gnrc/link_layer/gomach/gomach.c +++ b/sys/net/gnrc/link_layer/gomach/gomach.c @@ -2119,7 +2119,11 @@ static int _gomach_init(gnrc_netif_t *netif) { netdev_t *dev; - gnrc_netif_default_init(netif); + int res = gnrc_netif_default_init(netif); + if (res < 0) { + return res; + } + dev = netif->dev; dev->event_callback = _gomach_event_cb;