Re: [PATCH] ipw2200: Missing kmalloc check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



- Use kzalloc for IPW2200
- Fix config dependency for IPW2200

Signed-off-by: Panagiotis Issaris <[email protected]>

---

 drivers/net/wireless/Kconfig   |    2 +-
 drivers/net/wireless/ipw2200.c |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

applies-to: b3efbcb770e1202b65aee2fe70ea5a407a60e6a5
7e0cb9f1c4a239d06a0013997fc987c77fa46516
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index 7187958..3cf1ae2 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -192,7 +192,7 @@ config IPW_DEBUG

 config IPW2200
        tristate "Intel PRO/Wireless 2200BG and 2915ABG Network Connection"
-       depends on IEEE80211 && PCI
+       depends on NET_RADIO && IEEE80211 && PCI
        select FW_LOADER
        ---help---
           A driver for the Intel PRO/Wireless 2200BG and 2915ABG Network
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index 3db0c32..6da11b5 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -4029,12 +4029,11 @@ static struct ipw_rx_queue *ipw_rx_queue
        struct ipw_rx_queue *rxq;
        int i;

-       rxq = (struct ipw_rx_queue *)kmalloc(sizeof(*rxq), GFP_KERNEL);
+       rxq = kzalloc(sizeof(*rxq), GFP_KERNEL);
        if (unlikely(!rxq)) {
                IPW_ERROR("memory allocation failed\n");
                return NULL;
        }
-       memset(rxq, 0, sizeof(*rxq));
        spin_lock_init(&rxq->lock);
        INIT_LIST_HEAD(&rxq->rx_free);
        INIT_LIST_HEAD(&rxq->rx_used);
---
0.99.9.GIT
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux