cnss2: Avoid to call NULL plat_env
For dual chip solution, first chip may fail to probe because of pcie driver is not ready. During second chip probing, first chip may retry to probe. So, second chip may set/get plat_env[0], first chip may set/get plat_env[1]. If sencond chip not attached, plat_env[0] will be cleaned. When cnss_pci_probe() is called by first chip, cnss_get_plat_priv_by_rc_num() will call plat_env[0]. However it is already NULL. Change-Id: Ib959b1a524bf777fc6a826b2771611cb28b8cb99 CRs-Fixed: 3778085
This commit is contained in:

committed by
Ravindra Konda

parent
5ca3f8b383
commit
e2eff914bc
@@ -2406,7 +2406,7 @@ static int cnss_pci_config_msi_data(struct cnss_pci_data *pci_priv)
|
||||
static struct cnss_plat_data *
|
||||
cnss_get_plat_priv_by_driver_ops(struct cnss_wlan_driver *driver_ops)
|
||||
{
|
||||
int plat_env_count = cnss_get_plat_env_count();
|
||||
int plat_env_count = cnss_get_max_plat_env_count();
|
||||
struct cnss_plat_data *plat_env;
|
||||
struct cnss_pci_data *pci_priv;
|
||||
int i = 0;
|
||||
|
Reference in New Issue
Block a user