summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-11-18 02:01:52 +0100
committerJeff Garzik <jeff@garzik.org>2006-12-02 06:16:37 +0100
commitcbee9f9115da7eac5dc44a450f2dab343236cb2c (patch)
tree9aa55714dce5fd297a6b83fa304a6986b6972bdb /drivers/net
parent[PATCH] chelsio: use __netif_rx_schedule_prep (diff)
downloadlinux-cbee9f9115da7eac5dc44a450f2dab343236cb2c.tar.xz
linux-cbee9f9115da7eac5dc44a450f2dab343236cb2c.zip
[PATCH] chelsio: use kzalloc
Use kzalloc() in chelsio driver. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/chelsio/sge.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c
index 11c70b59a1a3..9fb77c6d6c6b 100644
--- a/drivers/net/chelsio/sge.c
+++ b/drivers/net/chelsio/sge.c
@@ -335,10 +335,9 @@ static int alloc_rx_resources(struct sge *sge, struct sge_params *p)
goto err_no_mem;
memset(q->entries, 0, size);
size = sizeof(struct freelQ_ce) * q->size;
- q->centries = kmalloc(size, GFP_KERNEL);
+ q->centries = kzalloc(size, GFP_KERNEL);
if (!q->centries)
goto err_no_mem;
- memset(q->centries, 0, size);
}
/*
@@ -463,10 +462,9 @@ static int alloc_tx_resources(struct sge *sge, struct sge_params *p)
goto err_no_mem;
memset(q->entries, 0, size);
size = sizeof(struct cmdQ_ce) * q->size;
- q->centries = kmalloc(size, GFP_KERNEL);
+ q->centries = kzalloc(size, GFP_KERNEL);
if (!q->centries)
goto err_no_mem;
- memset(q->centries, 0, size);
}
/*
@@ -1635,11 +1633,10 @@ static void espibug_workaround(void *data)
struct sge * __devinit t1_sge_create(struct adapter *adapter,
struct sge_params *p)
{
- struct sge *sge = kmalloc(sizeof(*sge), GFP_KERNEL);
+ struct sge *sge = kzalloc(sizeof(*sge), GFP_KERNEL);
if (!sge)
return NULL;
- memset(sge, 0, sizeof(*sge));
sge->adapter = adapter;
sge->netdev = adapter->port[0].dev;