qcacld-3.0: Validate wma handle before using it

Validate wma handle before using it.

Change-Id: Ic8d62ffa66ace75ef43326908ad4ebe19cb8533a
CRs-Fixed: 2669309
This commit is contained in:
Jianmin Zhu 2020-04-23 11:19:21 +08:00 • committed by nshrivas
commit e6655cd69a

View file

@ -4425,6 +4425,10 @@ QDF_STATUS wma_sta_mlme_vdev_start_continue(struct vdev_mlme_obj *vdev_mlme,
tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
enum vdev_assoc_type assoc_type;
if (!wma) {
wma_err("Invalid wma handle");
return QDF_STATUS_E_FAILURE;
}
if (mlme_is_chan_switch_in_progress(vdev_mlme->vdev)) {
mlme_set_chan_switch_in_progress(vdev_mlme->vdev, false);
lim_process_switch_channel_rsp(wma->mac_context, data);