aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
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)
335 goto err_no_mem; 335 goto err_no_mem;
336 memset(q->entries, 0, size); 336 memset(q->entries, 0, size);
337 size = sizeof(struct freelQ_ce) * q->size; 337 size = sizeof(struct freelQ_ce) * q->size;
338 q->centries = kmalloc(size, GFP_KERNEL); 338 q->centries = kzalloc(size, GFP_KERNEL);
339 if (!q->centries) 339 if (!q->centries)
340 goto err_no_mem; 340 goto err_no_mem;
341 memset(q->centries, 0, size);
342 } 341 }
343 342
344 /* 343 /*
@@ -463,10 +462,9 @@ static int alloc_tx_resources(struct sge *sge, struct sge_params *p)
463 goto err_no_mem; 462 goto err_no_mem;
464 memset(q->entries, 0, size); 463 memset(q->entries, 0, size);
465 size = sizeof(struct cmdQ_ce) * q->size; 464 size = sizeof(struct cmdQ_ce) * q->size;
466 q->centries = kmalloc(size, GFP_KERNEL); 465 q->centries = kzalloc(size, GFP_KERNEL);
467 if (!q->centries) 466 if (!q->centries)
468 goto err_no_mem; 467 goto err_no_mem;
469 memset(q->centries, 0, size);
470 } 468 }
471 469
472 /* 470 /*
@@ -1635,11 +1633,10 @@ static void espibug_workaround(void *data)
1635struct sge * __devinit t1_sge_create(struct adapter *adapter, 1633struct sge * __devinit t1_sge_create(struct adapter *adapter,
1636 struct sge_params *p) 1634 struct sge_params *p)
1637{ 1635{
1638 struct sge *sge = kmalloc(sizeof(*sge), GFP_KERNEL); 1636 struct sge *sge = kzalloc(sizeof(*sge), GFP_KERNEL);
1639 1637
1640 if (!sge) 1638 if (!sge)
1641 return NULL; 1639 return NULL;
1642 memset(sge, 0, sizeof(*sge));
1643 1640
1644 sge->adapter = adapter; 1641 sge->adapter = adapter;
1645 sge->netdev = adapter->port[0].dev; 1642 sge->netdev = adapter->port[0].dev;