qcacld-3.0: Add NULL checks before dereferencing

Add NULL checks before dereferencing in:
1) BMI layer
2) HTT layer
3) EPPING layer.

Change-Id: I9998d4aeb983dc101121a71d791d7ec626e3f5d4
CRs-Fixed: 1036390
This commit is contained in:
Himanshu Agarwal
2016-06-30 17:55:46 +05:30
committed by Gerrit - the friendly Code Review server
부모 1ff1757d6f
커밋 879a3bec5c
3개의 변경된 파일21개의 추가작업 그리고 3개의 파일을 삭제

파일 보기

@@ -1479,6 +1479,12 @@ void htt_fill_wisa_ext_header(qdf_nbuf_t msdu,
void *qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
QDF_STATUS status;
if (!qdf_ctx) {
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
"%s: qdf_ctx is NULL", __func__);
return;
}
local_desc_ext->valid_mcs_mask = 1;
if (WISA_MODE_EXT_HEADER_6MBPS == type)
local_desc_ext->mcs_mask = htt_ofdm_datarate_6_mbps;
@@ -1593,6 +1599,12 @@ htt_tx_desc_init(htt_pdev_handle pdev,
void *qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
QDF_STATUS status;
if (!qdf_ctx) {
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
"%s: qdf_ctx is NULL", __func__);
return;
}
word0 = (uint32_t *) htt_tx_desc;
word1 = word0 + 1;
/*