iwmc3200wifi: Test of wrong pointer after kzalloc in iwm_mlme_update_bss_table()
authorRoel Kluin <roel.kluin@gmail.com>
Tue, 9 Feb 2010 11:07:41 +0000 (12:07 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 9 Feb 2010 19:03:34 +0000 (14:03 -0500)
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>
drivers/net/wireless/iwmc3200wifi/rx.c

index 3db3d8b07491c1428bda6b166fd624ac9a1166bf..64d16fe37f9a1af2b31b382ba0d8db10332e4a9e 100644 (file)
@@ -794,7 +794,7 @@ static int iwm_mlme_update_bss_table(struct iwm_priv *iwm, u8 *buf,
        }
 
        bss->bss = kzalloc(bss_len, GFP_KERNEL);
-       if (!bss) {
+       if (!bss->bss) {
                kfree(bss);
                IWM_ERR(iwm, "Couldn't allocate bss\n");
                return -ENOMEM;