1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00

sys/net/lwmac: remove not needed pkt pointer check

This commit is contained in:
Alexandre Abadie 2019-09-20 09:01:01 +02:00
parent 661fdc6c1b
commit caf48cfb2d
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
2 changed files with 2 additions and 6 deletions

View File

@ -183,9 +183,7 @@ static bool _send_wa(gnrc_netif_t *netif)
/* Send WA */
if (_gnrc_lwmac_transmit(netif, pkt) < 0) {
LOG_ERROR("ERROR: [LWMAC-rx] Send WA failed.");
if (pkt != NULL) {
gnrc_pktbuf_release(pkt);
}
gnrc_pktbuf_release(pkt);
gnrc_lwmac_set_quit_rx(netif, true);
return false;
}

View File

@ -217,9 +217,7 @@ static uint8_t _send_wr(gnrc_netif_t *netif)
int res = _gnrc_lwmac_transmit(netif, pkt);
if (res < 0) {
LOG_ERROR("ERROR: [LWMAC-tx] Send WR failed.");
if (pkt != NULL) {
gnrc_pktbuf_release(pkt);
}
gnrc_pktbuf_release(pkt);
tx_info |= GNRC_LWMAC_TX_FAIL;
return tx_info;
}