mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
qcacmn: Add check for max pdev id on pdev search
Max pdev count check is performed before accessing the pdev list index Change-Id: I755a5cb595824968b057321b13a6e1c837ece669 CRs-Fixed: 2177109
This commit is contained in:
parent
7c1a52ca7a
commit
cb89aac98c
1 changed files with 8 additions and 0 deletions
|
|
@ -760,6 +760,10 @@ struct wlan_objmgr_pdev *wlan_objmgr_get_pdev_by_id(
|
|||
struct wlan_objmgr_psoc_objmgr *objmgr;
|
||||
struct wlan_objmgr_pdev *pdev = NULL;
|
||||
|
||||
/* If id is invalid, return */
|
||||
if (id >= WLAN_UMAC_MAX_PDEVS)
|
||||
return NULL;
|
||||
|
||||
wlan_psoc_obj_lock(psoc);
|
||||
objmgr = &psoc->soc_objmgr;
|
||||
/* get pdev from pdev list */
|
||||
|
|
@ -784,6 +788,10 @@ struct wlan_objmgr_pdev *wlan_objmgr_get_pdev_by_id_no_state(
|
|||
struct wlan_objmgr_psoc_objmgr *objmgr;
|
||||
struct wlan_objmgr_pdev *pdev = NULL;
|
||||
|
||||
/* If id is invalid, return */
|
||||
if (id >= WLAN_UMAC_MAX_PDEVS)
|
||||
return NULL;
|
||||
|
||||
wlan_psoc_obj_lock(psoc);
|
||||
objmgr = &psoc->soc_objmgr;
|
||||
/* get pdev from pdev list */
|
||||
|
|
|
|||
Loading…
Reference in a new issue