In case of device role undetermined, we should return error instread of
going ahead to set IEs to FW, which could potentially cause a NULL poiter
issue.
Bug
200015171
Change-Id: I2dd1828d6ad87845d3b0ed5bfeaffad6fe728a1f
Signed-off-by: Allen Yu <alleny@nvidia.com>
Reviewed-on: http://git-master/r/434900
Reviewed-by: Robert Shih <rshih@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-by: Kevin Bruckert <kbruckert@nvidia.com>
Tested-by: Kevin Bruckert <kbruckert@nvidia.com>
Reviewed-by: Chas Inman <chasi@nvidia.com>
dev_role = NL80211_IFTYPE_P2P_GO;
}
+ if (dev_role == 0) {
+ WL_ERR(("Unknown device role!\n"));
+ err = BCME_ERROR;
+ goto fail;
+ }
+
if (!check_dev_role_integrity(wl, dev_role))
goto fail;
dev_role = NL80211_IFTYPE_P2P_GO;
}
+ if (dev_role == 0) {
+ WL_ERR(("Unknown device role!\n"));
+ err = BCME_ERROR;
+ goto fail;
+ }
+
if (!check_dev_role_integrity(wl, dev_role))
goto fail;