qcacld-3.0: Fix static analysis issues in wma_scan_roam.c
Pointer returned from cds_get_contex() may be NULL. Hence add a NULL check before dereferencing. Change-Id: I809d70a91e563590468141d4a9e4296bd511d472 CRs-Fixed: 3044372
This commit is contained in:

committed by
Madan Koyyalamudi

parent
9f63c82609
commit
d682cfa6be
@@ -5127,6 +5127,9 @@ void cm_roam_update_vdev(struct roam_offload_synch_ind *sync_ind)
|
||||
{
|
||||
tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
if (!wma)
|
||||
return;
|
||||
|
||||
wma_roam_update_vdev(wma, sync_ind);
|
||||
}
|
||||
|
||||
@@ -5137,6 +5140,9 @@ cm_roam_pe_sync_callback(struct roam_offload_synch_ind *sync_ind,
|
||||
tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
QDF_STATUS status;
|
||||
|
||||
if (!wma)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
status = wma->pe_roam_synch_cb(wma->mac_context,
|
||||
sync_ind, ie_len,
|
||||
SIR_ROAM_SYNCH_PROPAGATION);
|
||||
@@ -5149,6 +5155,9 @@ void cm_update_phymode_on_roam(uint8_t vdev_id, uint8_t *bssid,
|
||||
{
|
||||
tp_wma_handle wma = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
|
||||
if (!wma)
|
||||
return;
|
||||
|
||||
wma_update_phymode_on_roam(wma, bssid, chan, &wma->interfaces[vdev_id]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user