qcacmn: Add proper handling for failure cases

Add proper handling for failure cases

Change-Id: I5c54a8c0e38a034cc5abfc1bb3ec006841d5f273
CRs-Fixed: 3612145
This commit is contained in:
Harsh Kumar Bijlani
2023-09-11 12:39:21 +05:30
committed by Rahul Choudhary
父節點 46aca5dfc5
當前提交 acb5e1d631
共有 2 個文件被更改,包括 14 次插入5 次删除

查看文件

@@ -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,
htt_logger_bufp);
return QDF_STATUS_SUCCESS;
status = DP_HTT_SEND_HTC_PKT(soc, pkt,
HTT_H2T_MSG_TYPE_RX_FULL_MONITOR_MODE,
htt_logger_bufp);
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;