mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:32:45 +01:00
netdev_ieee802154_submac: check error codes
This commit is contained in:
parent
ee3fcaf8c2
commit
abb88b1ffe
@ -304,7 +304,13 @@ static int _init(netdev_t *netdev)
|
||||
ieee802154_submac_t *submac = &netdev_submac->submac;
|
||||
netdev_ieee802154_setup(netdev_ieee802154);
|
||||
|
||||
ieee802154_submac_init(submac, (network_uint16_t*) netdev_ieee802154->short_addr, (eui64_t*) netdev_ieee802154->long_addr);
|
||||
int res = ieee802154_submac_init(submac,
|
||||
(network_uint16_t*) netdev_ieee802154->short_addr,
|
||||
(eui64_t*) netdev_ieee802154->long_addr);
|
||||
|
||||
if (res < 0) {
|
||||
return res;
|
||||
}
|
||||
|
||||
/* This function already sets the PAN ID to the default one */
|
||||
netdev_ieee802154_reset(netdev_ieee802154);
|
||||
|
Loading…
Reference in New Issue
Block a user