Merge "qcacld-3.0: Fix possible NULL pointer de-reference" into wlan-cld3.driver.lnx.2.0
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
8e0d0554d8
@@ -5458,6 +5458,11 @@ static uint32_t ol_txrx_get_cfg(void *soc, enum cdp_dp_cfg cfg)
|
|||||||
ol_txrx_pdev_handle pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
ol_txrx_pdev_handle pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||||
uint32_t value = 0;
|
uint32_t value = 0;
|
||||||
|
|
||||||
|
if (!pdev) {
|
||||||
|
qdf_print("pdev is NULL");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
cfg_ctx = (struct txrx_pdev_cfg_t *)(pdev->ctrl_pdev);
|
cfg_ctx = (struct txrx_pdev_cfg_t *)(pdev->ctrl_pdev);
|
||||||
switch (cfg) {
|
switch (cfg) {
|
||||||
case cfg_dp_enable_data_stall:
|
case cfg_dp_enable_data_stall:
|
||||||
|
@@ -912,6 +912,12 @@ static inline void ol_txrx_ipa_tx_params(
|
|||||||
{
|
{
|
||||||
qdf_device_t osdev = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
|
qdf_device_t osdev = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
|
||||||
|
|
||||||
|
if (!osdev) {
|
||||||
|
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
|
||||||
|
"%s: qdf device is null!", __func__);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
QDF_IPA_PIPE_IN_DL_COMP_RING_BASE_PA(pipe_in) =
|
QDF_IPA_PIPE_IN_DL_COMP_RING_BASE_PA(pipe_in) =
|
||||||
qdf_mem_get_dma_addr(osdev,
|
qdf_mem_get_dma_addr(osdev,
|
||||||
&ipa_res->tx_comp_ring->mem_info);
|
&ipa_res->tx_comp_ring->mem_info);
|
||||||
@@ -939,6 +945,14 @@ static inline void ol_txrx_ipa_rx_params(
|
|||||||
struct ol_txrx_ipa_resources *ipa_res,
|
struct ol_txrx_ipa_resources *ipa_res,
|
||||||
qdf_ipa_wdi_in_params_t *pipe_in)
|
qdf_ipa_wdi_in_params_t *pipe_in)
|
||||||
{
|
{
|
||||||
|
qdf_device_t osdev = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
|
||||||
|
|
||||||
|
if (!osdev) {
|
||||||
|
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
|
||||||
|
"%s: qdf device is null!", __func__);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
QDF_IPA_PIPE_IN_UL_RDY_RING_BASE_PA(pipe_in) =
|
QDF_IPA_PIPE_IN_UL_RDY_RING_BASE_PA(pipe_in) =
|
||||||
ipa_res->rx_rdy_ring->mem_info.pa;
|
ipa_res->rx_rdy_ring->mem_info.pa;
|
||||||
QDF_IPA_PIPE_IN_UL_RDY_RING_SIZE(pipe_in) =
|
QDF_IPA_PIPE_IN_UL_RDY_RING_SIZE(pipe_in) =
|
||||||
@@ -946,7 +960,7 @@ static inline void ol_txrx_ipa_rx_params(
|
|||||||
QDF_IPA_PIPE_IN_UL_RDY_RING_RP_PA(pipe_in) =
|
QDF_IPA_PIPE_IN_UL_RDY_RING_RP_PA(pipe_in) =
|
||||||
ipa_res->rx_proc_done_idx->mem_info.pa;
|
ipa_res->rx_proc_done_idx->mem_info.pa;
|
||||||
OL_TXRX_IPA_WDI2_SET(pipe_in, ipa_res,
|
OL_TXRX_IPA_WDI2_SET(pipe_in, ipa_res,
|
||||||
cds_get_context(QDF_MODULE_ID_QDF_DEVICE));
|
osdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -978,6 +992,12 @@ QDF_STATUS ol_txrx_ipa_setup(struct cdp_pdev *ppdev, void *ipa_i2w_cb,
|
|||||||
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (!osdev) {
|
||||||
|
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
|
||||||
|
"%s: qdf device is null!", __func__);
|
||||||
|
return QDF_STATUS_E_NOENT;
|
||||||
|
}
|
||||||
|
|
||||||
qdf_mem_zero(&pipe_in, sizeof(pipe_in));
|
qdf_mem_zero(&pipe_in, sizeof(pipe_in));
|
||||||
qdf_mem_zero(&pipe_out, sizeof(pipe_out));
|
qdf_mem_zero(&pipe_out, sizeof(pipe_out));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user