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:

committad av
Gerrit - the friendly Code Review server

förälder
1ff1757d6f
incheckning
879a3bec5c
@@ -218,15 +218,15 @@ QDF_STATUS bmi_download_firmware(struct ol_context *ol_ctx)
|
||||
{
|
||||
struct hif_opaque_softc *scn = ol_ctx->scn;
|
||||
|
||||
if (NO_BMI || !hif_needs_bmi(scn))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
if (!scn) {
|
||||
BMI_ERR("Invalid scn context");
|
||||
bmi_assert(0);
|
||||
return QDF_STATUS_NOT_INITIALIZED;
|
||||
}
|
||||
|
||||
if (NO_BMI || !hif_needs_bmi(scn))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
return bmi_firmware_download(ol_ctx);
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
/*
|
||||
|
@@ -262,6 +262,12 @@ int epping_enable(struct device *parent_dev)
|
||||
pEpping_ctx->target_type = tgt_info->target_type;
|
||||
|
||||
ol_ctx = cds_get_context(QDF_MODULE_ID_BMI);
|
||||
if (!ol_ctx) {
|
||||
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL,
|
||||
"%s: ol_ctx is NULL", __func__);
|
||||
return A_ERROR;
|
||||
}
|
||||
|
||||
epping_update_ol_config();
|
||||
#ifndef FEATURE_BMI_2
|
||||
/* Initialize BMI and Download firmware */
|
||||
|
Referens i nytt ärende
Block a user