aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSharon Dvir <[email protected]>2016-07-25 16:11:05 +0300
committerLuca Coelho <[email protected]>2016-08-29 22:29:04 +0300
commitbdc98b13716eafc454457e068d6c8aaffaaa71e4 (patch)
treeedda423f41f03d9bb84c750d7e8f5471ea8d1ba0
parent360647959323ec066cc55d82133df73e30530824 (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 <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/mvm.h2
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 {
static inline struct iwl_mvm_vif *
iwl_mvm_vif_from_mac80211(struct ieee80211_vif *vif)
{
+ if (!vif)
+ return NULL;
return (void *)vif->drv_priv;
}