diff --git a/subsys/net/l2/ethernet/ethernet.c b/subsys/net/l2/ethernet/ethernet.c index f5cd3bf0fd1..568611404bb 100644 --- a/subsys/net/l2/ethernet/ethernet.c +++ b/subsys/net/l2/ethernet/ethernet.c @@ -732,6 +732,7 @@ error: static inline int ethernet_enable(struct net_if *iface, bool state) { + int ret = 0; const struct ethernet_api *eth = net_if_get_device(iface)->api; @@ -743,15 +744,15 @@ static inline int ethernet_enable(struct net_if *iface, bool state) net_arp_clear_cache(iface); if (eth->stop) { - eth->stop(net_if_get_device(iface)); + ret = eth->stop(net_if_get_device(iface)); } } else { if (eth->start) { - eth->start(net_if_get_device(iface)); + ret = eth->start(net_if_get_device(iface)); } } - return 0; + return ret; } enum net_l2_flags ethernet_flags(struct net_if *iface)