Adapter can be NULL and accessing it result in crash Remove NULL check for adapter to avoid crash CRs-Fixed: 1094603 Change-Id: I1c7efdfeb7829640cef740f873cb367befd810c9
@@ -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);