Ver Fonte

qcacld-3.0: Remove NULL check in get Tx power API

Adapter can be NULL and accessing it result in crash
Remove NULL check for adapter to avoid crash

CRs-Fixed: 1094603
Change-Id: I1c7efdfeb7829640cef740f873cb367befd810c9
SaidiReddy Yenuga há 8 anos atrás
pai
commit
c56a767e70
1 ficheiros alterados com 0 adições e 5 exclusões
  1. 0 5
      core/hdd/src/wlan_hdd_power.c

+ 0 - 5
core/hdd/src/wlan_hdd_power.c

@@ -2371,11 +2371,6 @@ static int __wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
 		return status;
 	}
 
-	if (!adapter) {
-		hdd_err("adapter is NULL");
-		return -ENOENT;
-	}
-
 	/* Validate adapter sessionId */
 	if (wlan_hdd_validate_session_id(adapter->sessionId)) {
 		hdd_err("invalid session id: %d", adapter->sessionId);