Commit 9ee01b30 authored by Pontus Fuchs's avatar Pontus Fuchs Committed by John W. Linville

ar5523: Don't dereference sta if NULL

A missing else caused a potential NULL dereference.
Reported-by: default avatarYuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: default avatarPontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d01a303e
......@@ -1196,7 +1196,7 @@ static void ar5523_create_rateset(struct ar5523 *ar,
if (!sta) {
ar5523_info(ar, "STA not found. Cannot set rates\n");
sta_rate_set = bss_conf->basic_rates;
}
} else
sta_rate_set = sta->supp_rates[ar->hw->conf.channel->band];
ar5523_dbg(ar, "sta rate_set = %08x\n", sta_rate_set);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment