aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPanagiotis Issaris <panagiotis.issaris@gmail.com>2005-09-05 04:14:10 +0200
committerJeff Garzik <jgarzik@pobox.com>2005-10-28 16:57:20 -0400
commitad18b0ea089928367185e13d11424aea91d4b41f (patch)
treea909f1bd659a5fe35cbb90da1d097b17c2efa3ca /drivers
parent4f075707a9380592586d608a8d04dfbdb3c40339 (diff)
[PATCH] ipw2200: Missing kmalloc check
The ipw2200 driver code in current GIT contains a kmalloc() followed by a memset() without handling a possible memory allocation failure. Signed-off-by: Panagiotis Issaris <panagiotis.issaris@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ipw2200.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index de4e6c23e4b..3db0c32afe8 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -4030,6 +4030,10 @@ static struct ipw_rx_queue *ipw_rx_queue_alloc(struct ipw_priv *priv)
int i;
rxq = (struct ipw_rx_queue *)kmalloc(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);