Skip to content

Commit

Permalink
minstrel_ht: remove unnecessary NULL check in minstrel_ht_update_caps
Browse files Browse the repository at this point in the history
If sta is NULL, we will have problems long before we get here...

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: Felix Fietkau <nbd@openwrt.org>
  • Loading branch information
John W. Linville committed Jul 26, 2010
1 parent a6e492b commit 00fc90c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/rc80211_minstrel_ht.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 00fc90c

Please sign in to comment.