qcacmn: Add proper handling for failure cases
Add proper handling for failure cases Change-Id: I5c54a8c0e38a034cc5abfc1bb3ec006841d5f273 CRs-Fixed: 3612145
This commit is contained in:

committed by
Rahul Choudhary

parent
46aca5dfc5
commit
acb5e1d631
@@ -919,6 +919,7 @@ int htt_h2t_full_mon_cfg(struct htt_soc *htt_soc,
|
||||
qdf_nbuf_t htt_msg;
|
||||
uint32_t *msg_word;
|
||||
uint8_t *htt_logger_bufp;
|
||||
QDF_STATUS status;
|
||||
|
||||
htt_msg = qdf_nbuf_alloc(soc->osdev,
|
||||
HTT_MSG_BUF_SIZE(
|
||||
@@ -991,9 +992,16 @@ int htt_h2t_full_mon_cfg(struct htt_soc *htt_soc,
|
||||
|
||||
SET_HTC_PACKET_NET_BUF_CONTEXT(&pkt->htc_pkt, htt_msg);
|
||||
qdf_debug("config: %d", config);
|
||||
DP_HTT_SEND_HTC_PKT(soc, pkt, HTT_H2T_MSG_TYPE_RX_FULL_MONITOR_MODE,
|
||||
status = DP_HTT_SEND_HTC_PKT(soc, pkt,
|
||||
HTT_H2T_MSG_TYPE_RX_FULL_MONITOR_MODE,
|
||||
htt_logger_bufp);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
qdf_nbuf_free(htt_msg);
|
||||
htt_htc_pkt_free(soc, pkt);
|
||||
}
|
||||
|
||||
return status;
|
||||
fail1:
|
||||
qdf_nbuf_free(htt_msg);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
@@ -2097,12 +2097,13 @@ struct dp_peer *dp_get_primary_link_peer_by_id(struct dp_soc *soc,
|
||||
for (i = 0; i < link_peers_info.num_links; i++) {
|
||||
link_peer = link_peers_info.link_peers[i];
|
||||
if (link_peer->primary_link) {
|
||||
primary_peer = link_peer;
|
||||
/*
|
||||
* Take additional reference over
|
||||
* primary link peer.
|
||||
*/
|
||||
dp_peer_get_ref(NULL, primary_peer, mod_id);
|
||||
if (QDF_STATUS_SUCCESS ==
|
||||
dp_peer_get_ref(NULL, link_peer, mod_id))
|
||||
primary_peer = link_peer;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user