mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
qcacmn: Add NULL check for qdf_dev in init_deinit_free_num_units()
As return of wlan_psoc_get_qdf_dev(), qdf_dev may be NULL. Add null check in case referencing null. Change-Id: I7e9bd54e5f4b5260f664bdd4ccee0e4267e2b81e CRs-Fixed: 2247327
This commit is contained in:
parent
0a341a5e92
commit
562c9115ce
1 changed files with 5 additions and 0 deletions
|
|
@ -288,6 +288,11 @@ QDF_STATUS init_deinit_free_num_units(struct wlan_objmgr_psoc *psoc,
|
|||
status = tgt_hdl->tif_ops->mem_mgr_free_chunks(psoc, tgt_hdl);
|
||||
} else {
|
||||
qdf_dev = wlan_psoc_get_qdf_dev(psoc);
|
||||
if (!qdf_dev) {
|
||||
target_if_err("qdf_dev is null");
|
||||
QDF_BUG(0);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
info = (&tgt_hdl->info);
|
||||
for (idx = 0; idx < info->num_mem_chunks; idx++) {
|
||||
qdf_mem_free_consistent(
|
||||
|
|
|
|||
Loading…
Reference in a new issue