Skip to content

Commit

Permalink
iwlwifi: mvm: check if vif is NULL before using it
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sharon Dvir authored and Luca Coelho committed Aug 29, 2016
1 parent 3606479 commit bdc98b1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit bdc98b1

Please sign in to comment.