From: John W. Linville Date: Thu, 22 Jul 2010 19:36:02 +0000 (-0400) Subject: minstrel_ht: remove unnecessary NULL check in minstrel_ht_update_caps X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=00fc90c886220efe8b634d3f2a04713fcebbe2c0;p=deliverable%2Flinux.git minstrel_ht: remove unnecessary NULL check in minstrel_ht_update_caps If sta is NULL, we will have problems long before we get here... Reported-by: Dan Carpenter Signed-off-by: John W. Linville Cc: Felix Fietkau --- diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index b5ace243546c..a16694bb634b 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -636,7 +636,7 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband, int i; /* fall back to the old minstrel for legacy stations */ - if (sta && !sta->ht_cap.ht_supported) { + if (!sta->ht_cap.ht_supported) { msp->is_ht = false; memset(&msp->legacy, 0, sizeof(msp->legacy)); msp->legacy.r = msp->ratelist;