Bluetooth: controller: split: Fix control flow issues
This fixes reported Coverity CID 203393 control flow issues. Fixes #18381. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
951b47fab9
commit
07460176ed
1 changed files with 9 additions and 11 deletions
|
@ -3856,7 +3856,6 @@ static inline int length_req_rsp_recv(struct ll_conn *conn, memq_link_t *link,
|
|||
u16_t eff_rx_time;
|
||||
u16_t eff_tx_time;
|
||||
#endif /* CONFIG_BT_CTLR_PHY */
|
||||
u8_t nack = 0U;
|
||||
|
||||
/* Check for free ctrl tx PDU */
|
||||
if (pdu_rx->llctrl.opcode == PDU_DATA_LLCTRL_TYPE_LENGTH_REQ) {
|
||||
|
@ -4033,21 +4032,20 @@ static inline int length_req_rsp_recv(struct ll_conn *conn, memq_link_t *link,
|
|||
|
||||
send_length_resp:
|
||||
if (tx) {
|
||||
if (nack) {
|
||||
mem_release(tx, &mem_conn_tx_ctrl.free);
|
||||
} else {
|
||||
/* FIXME: if nack-ing is implemented then release tx instead
|
||||
* of sending resp.
|
||||
*/
|
||||
#if !defined(CONFIG_BT_CTLR_PHY)
|
||||
length_resp_send(conn, tx, eff_rx_octets,
|
||||
eff_tx_octets);
|
||||
length_resp_send(conn, tx, eff_rx_octets,
|
||||
eff_tx_octets);
|
||||
#else /* CONFIG_BT_CTLR_PHY */
|
||||
length_resp_send(conn, tx, eff_rx_octets,
|
||||
eff_rx_time, eff_tx_octets,
|
||||
eff_tx_time);
|
||||
length_resp_send(conn, tx, eff_rx_octets,
|
||||
eff_rx_time, eff_tx_octets,
|
||||
eff_tx_time);
|
||||
#endif /* CONFIG_BT_CTLR_PHY */
|
||||
}
|
||||
}
|
||||
|
||||
return nack;
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_BT_CTLR_DATA_LENGTH */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue