qcacmn: Add pdev NULL check in reg_set_country
reg_set_country may be called by hdd_reg_notifier, which is running in a context of worker create outside driver, it may be scheduled to run during driver unloading process which set hdd_ctx->hdd_pdev to 0. Change-Id: Ie51d772294302ad6b04117847c28a556694e9bca CRs-Fixed: 2208085
This commit is contained in:
@@ -1413,6 +1413,11 @@ QDF_STATUS reg_set_country(struct wlan_objmgr_pdev *pdev,
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
struct cc_regdmn_s rd;
|
||||
|
||||
if (!pdev) {
|
||||
reg_err("pdev is NULL");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
if (!country) {
|
||||
reg_err("country code is NULL");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
Reference in New Issue
Block a user