Return-path: Received: from ey-out-2122.google.com ([74.125.78.25]:26917 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754062Ab0BILAy (ORCPT ); Tue, 9 Feb 2010 06:00:54 -0500 Message-ID: <4B7141FD.7050605@gmail.com> Date: Tue, 09 Feb 2010 12:07:41 +0100 From: Roel Kluin MIME-Version: 1.0 To: Samuel Ortiz , Zhu Yi , Intel Linux Wireless , linux-wireless@vger.kernel.org, Andrew Morton , LKML Subject: [PATCH] iwmc3200wifi: Test of wrong pointer after kzalloc in iwm_mlme_update_bss_table() Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: The wrong pointer was tested. Signed-off-by: Roel Kluin --- drivers/net/wireless/iwmc3200wifi/rx.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/iwmc3200wifi/rx.c b/drivers/net/wireless/iwmc3200wifi/rx.c index 6d6ed74..f727b4a 100644 --- a/drivers/net/wireless/iwmc3200wifi/rx.c +++ b/drivers/net/wireless/iwmc3200wifi/rx.c @@ -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;