1
0
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:
Jose Alamos 2021-06-15 15:15:31 +02:00
parent ee3fcaf8c2
commit abb88b1ffe
No known key found for this signature in database
GPG Key ID: F483EB800EF89DD9

View File

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