Commit 33a5d083e786f0c3fb4efedb59b0e8e3de39963b

Authored by Roel Kluin
Committed by John W. Linville
1 parent 6c8afef551

iwmc3200wifi: Test of wrong pointer after kzalloc in iwm_mlme_update_bss_table()

The wrong pointer was tested.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/net/wireless/iwmc3200wifi/rx.c
... ... @@ -794,7 +794,7 @@
794 794 }
795 795  
796 796 bss->bss = kzalloc(bss_len, GFP_KERNEL);
797   - if (!bss) {
  797 + if (!bss->bss) {
798 798 kfree(bss);
799 799 IWM_ERR(iwm, "Couldn't allocate bss\n");
800 800 return -ENOMEM;