mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
qcacld-3.0: Add null check for qdf_ctx in hdd_configure_cds
Currently in function hdd_configure_cds the driver is passing the pointer from cds_get_context to ucfg_ipa_uc_ol_init without any NULL check. This pointer later then gets dereferenced which can cause null pointer dereference. To solve this, added a null check before calling ucfg_ipa_uc_ol_init Change-Id: Ie0d8e103c9eeac76d285c4b3870c3c4ea9172dc6 CRs-Fixed: 2462711
This commit is contained in:
parent
2168aadfa4
commit
f876667985
1 changed files with 9 additions and 2 deletions
|
|
@ -11181,6 +11181,7 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx)
|
|||
bool value;
|
||||
enum pmo_auto_pwr_detect_failure_mode auto_power_fail_mode;
|
||||
bool bval = false;
|
||||
qdf_device_t qdf_ctx;
|
||||
|
||||
mac_handle = hdd_ctx->mac_handle;
|
||||
|
||||
|
|
@ -11277,8 +11278,14 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx)
|
|||
* IPA module before configuring them to FW. Sequence required as crash
|
||||
* observed otherwise.
|
||||
*/
|
||||
if (ucfg_ipa_uc_ol_init(hdd_ctx->pdev,
|
||||
cds_get_context(QDF_MODULE_ID_QDF_DEVICE))) {
|
||||
|
||||
qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
|
||||
if (!qdf_ctx) {
|
||||
hdd_err("QDF device context is NULL");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (ucfg_ipa_uc_ol_init(hdd_ctx->pdev, qdf_ctx)) {
|
||||
hdd_err("Failed to setup pipes");
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue