From c1868c0b78892a8b2329dae835786a8a7f643fe2 Mon Sep 17 00:00:00 2001 From: Luca Coelho Date: Mon, 2 Aug 2021 17:28:22 +0300 Subject: [PATCH] iwlwifi: mvm: remove check for vif in iwl_mvm_vif_from_mac80211() This check is useless, because we would return NULL in that case and none of the callers actually check that the return value was not NULL before accessing it. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210802172232.f1c4844a2650.If4dc009e22cda51099a1dc4237d04bf4313055d6@changeid Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index b50942f..82a53cb 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -431,8 +431,6 @@ struct iwl_mvm_vif { static inline struct iwl_mvm_vif * iwl_mvm_vif_from_mac80211(struct ieee80211_vif *vif) { - if (!vif) - return NULL; return (void *)vif->drv_priv; } -- 2.7.4