mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
qcacld-3.0: Move tdls_osif_init_cb after checking tdls_feature_flags
If tdls feature is disabled, as currently tdls_osif_init_cb is called before checking flags, tdls_osif_deinit_cb will be missed which causes memory leak. Do tdls_osif_init_cb after checking tdls_feature_flags. Change-Id: I008c69a9b39f5321d1ca79f5193539f5abd32a02 CRs-Fixed: 2459853
This commit is contained in:
parent
d071de06fe
commit
37204fd470
1 changed files with 6 additions and 5 deletions
|
|
@ -256,17 +256,18 @@ QDF_STATUS tdls_vdev_obj_create_notification(struct wlan_objmgr_vdev *vdev,
|
|||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
if (tdls_soc_obj->tdls_osif_init_cb) {
|
||||
status = tdls_soc_obj->tdls_osif_init_cb(vdev);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return status;
|
||||
}
|
||||
tdls_feature_flags = tdls_soc_obj->tdls_configs.tdls_feature_flags;
|
||||
if (!TDLS_IS_ENABLED(tdls_feature_flags)) {
|
||||
tdls_debug("disabled in ini");
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
if (tdls_soc_obj->tdls_osif_init_cb) {
|
||||
status = tdls_soc_obj->tdls_osif_init_cb(vdev);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
return status;
|
||||
}
|
||||
|
||||
/* TODO: Add concurrency check */
|
||||
|
||||
tdls_vdev_obj = qdf_mem_malloc(sizeof(*tdls_vdev_obj));
|
||||
|
|
|
|||
Loading…
Reference in a new issue