mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 09:14:18 -04:00
qcacld-3.0: check if non-zero list count before deleting node
Add a check if list count is non-zero before deleting the node from IPA tx descriptor list. Change-Id: I9913c636107686755ffc5da2b585028a4be7a1e9 CRs-Fixed: 2601601
This commit is contained in:
parent
8532a288dc
commit
451f996d6b
1 changed files with 6 additions and 4 deletions
|
|
@ -313,9 +313,10 @@ static void wlan_ipa_send_pkt_to_tl(
|
|||
|
||||
qdf_spin_lock_bh(&ipa_ctx->q_lock);
|
||||
/* get free Tx desc and assign ipa_tx_desc pointer */
|
||||
if (qdf_list_remove_front(&ipa_ctx->tx_desc_free_list,
|
||||
if (ipa_ctx->tx_desc_free_list.count &&
|
||||
qdf_list_remove_front(&ipa_ctx->tx_desc_free_list,
|
||||
(qdf_list_node_t **)&tx_desc) ==
|
||||
QDF_STATUS_SUCCESS) {
|
||||
QDF_STATUS_SUCCESS) {
|
||||
tx_desc->ipa_tx_desc_ptr = ipa_tx_desc;
|
||||
ipa_ctx->stats.num_tx_desc_q_cnt++;
|
||||
qdf_spin_unlock_bh(&ipa_ctx->q_lock);
|
||||
|
|
@ -2638,9 +2639,10 @@ static inline void wlan_ipa_free_tx_desc_list(struct wlan_ipa_priv *ipa_ctx)
|
|||
if (ipa_tx_desc)
|
||||
qdf_ipa_free_skb(ipa_tx_desc);
|
||||
|
||||
if (qdf_list_remove_node(&ipa_ctx->tx_desc_free_list,
|
||||
if (ipa_ctx->tx_desc_free_list.count &&
|
||||
qdf_list_remove_node(&ipa_ctx->tx_desc_free_list,
|
||||
&ipa_ctx->tx_desc_pool[i].node) !=
|
||||
QDF_STATUS_SUCCESS)
|
||||
QDF_STATUS_SUCCESS)
|
||||
ipa_err("Failed to remove node from tx desc freelist");
|
||||
}
|
||||
qdf_spin_unlock_bh(&ipa_ctx->q_lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue