qcacld-3.0: Remove unnecessary NULL check

NULL check is not required before freeing the memory allocated to
dfs_radartable.

Add the changes to remove unnecessary NULL checks.

Change-Id: I063c036024e6bfc235a418056d15843646bc5a3c
CRs-Fixed: 1063843
This commit is contained in:
Kapil Gupta
2016-09-07 10:56:07 +05:30
committed by Gerrit - the friendly Code Review server
父節點 d1353d2dd0
當前提交 637c81577b

查看文件

@@ -458,16 +458,14 @@ int dfs_attach(struct ieee80211com *ic)
return 0;
bad2:
if (dfs->dfs_radartable != NULL) {
for (n = 0; n < 256; n++) {
if (dfs->dfs_radartable[n] != NULL) {
OS_FREE(dfs->dfs_radartable[n]);
dfs->dfs_radartable[n] = NULL;
}
for (n = 0; n < 256; n++) {
if (dfs->dfs_radartable[n] != NULL) {
OS_FREE(dfs->dfs_radartable[n]);
dfs->dfs_radartable[n] = NULL;
}
OS_FREE(dfs->dfs_radartable);
dfs->dfs_radartable = NULL;
}
OS_FREE(dfs->dfs_radartable);
dfs->dfs_radartable = NULL;
bad1:
for (n = 0; n < DFS_MAX_RADAR_TYPES; n++) {
if (dfs->dfs_radarf[n] != NULL) {