diff options
author | Sharon Dvir <sharon.dvir@intel.com> | 2016-07-25 16:11:05 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2016-08-29 22:29:04 +0300 |
commit | bdc98b13716eafc454457e068d6c8aaffaaa71e4 (patch) | |
tree | edda423f41f03d9bb84c750d7e8f5471ea8d1ba0 | |
parent | 360647959323ec066cc55d82133df73e30530824 (diff) | |
download | op-kernel-dev-bdc98b13716eafc454457e068d6c8aaffaaa71e4.zip op-kernel-dev-bdc98b13716eafc454457e068d6c8aaffaaa71e4.tar.gz |
iwlwifi: mvm: check if vif is NULL before using it
wdev_to_ieee80211_vif() might return NULL.
Check that vif != NULL before dereferencing it.
Signed-off-by: Sharon Dvir <sharon.dvir@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index b4fc86d..6a615bb 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -467,6 +467,8 @@ 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; } |