Browse Source

qcacld-3.0: Remove unnecessary net_device validation

Currently net_device is being validated inside the
hdd_for_each_adapter_dev_held_safe loop. This is not required as
hdd_for_each_adapter_dev_held_safe will hold the reference for
net_device and prevent it from being deleted. So net_device validation
is not required inside hdd_for_each_adapter_dev_held_safe loop.

Change-Id: Id7e78748b80e7a3bbe50fee43a28fd0d48bd6856
CRs-Fixed: 2812716
Bapiraju Alla 4 years ago
parent
commit
171719ca30
1 changed files with 1 additions and 2 deletions
  1. 1 2
      core/hdd/src/wlan_hdd_main.c

+ 1 - 2
core/hdd/src/wlan_hdd_main.c

@@ -14179,8 +14179,7 @@ static void hdd_state_info_dump(char **buf_ptr, uint16_t *size)
 		hdd_ctx->is_scheduler_suspended);
 
 	hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
-		if (adapter->dev)
-			len += scnprintf(buf + len, *size - len,
+		len += scnprintf(buf + len, *size - len,
 				"\n device name: %s", adapter->dev->name);
 		len += scnprintf(buf + len, *size - len,
 				"\n device_mode: %d", adapter->device_mode);