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:
parent
661fdc6c1b
commit
caf48cfb2d
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user