diff options
author | Sharon Dvir <sharon.dvir@intel.com> | 2016-07-25 09:11:05 -0400 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2016-08-29 15:29:04 -0400 |
commit | bdc98b13716eafc454457e068d6c8aaffaaa71e4 (patch) | |
tree | edda423f41f03d9bb84c750d7e8f5471ea8d1ba0 | |
parent | 360647959323ec066cc55d82133df73e30530824 (diff) |
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 b4fc86d5d7ef..6a615bb73042 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 { | |||
467 | static inline struct iwl_mvm_vif * | 467 | static inline struct iwl_mvm_vif * |
468 | iwl_mvm_vif_from_mac80211(struct ieee80211_vif *vif) | 468 | iwl_mvm_vif_from_mac80211(struct ieee80211_vif *vif) |
469 | { | 469 | { |
470 | if (!vif) | ||
471 | return NULL; | ||
470 | return (void *)vif->drv_priv; | 472 | return (void *)vif->drv_priv; |
471 | } | 473 | } |
472 | 474 | ||