qcacld-3.0: Null-check context in hdd_set_netdev_flags

Add null check for 'hdd_ctx' and 'soc' before accessing them in
hdd_set_netdev_flags function.

Change-Id: I0fc115170943c402b522989d76b278ea1fbd4862
CRs-Fixed: 2706429
这个提交包含在:
Mohit Khanna
2020-06-09 12:03:35 -07:00
提交者 nshrivas
父节点 55bcf005c8
当前提交 8c40bf010d

查看文件

@@ -6883,11 +6883,16 @@ void hdd_set_netdev_flags(struct hdd_adapter *adapter)
hdd_err("invalid input!");
return;
}
device_mode = adapter->device_mode;
hdd_ctx = adapter->hdd_ctx;
device_mode = adapter->device_mode;
soc = cds_get_context(QDF_MODULE_ID_SOC);
if (!soc || !hdd_ctx) {
hdd_err("invalid SOC or HDD context!");
return;
}
/* Determine device_mode specific configuration */
switch (device_mode) {
case QDF_NDI_MODE: