aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/amso1100
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-11-04 23:07:36 -0400
committerRoland Dreier <rolandd@cisco.com>2011-01-12 14:11:58 -0500
commit948579cd8c6ea7c8c98c52b79f4470952e182ebd (patch)
tree77e85adbdd07be8394fa60d08d3f1dbda3c67393 /drivers/infiniband/hw/amso1100
parent4162cf64973df51fc885825bc9ca4d055891c49f (diff)
RDMA: Use vzalloc() to replace vmalloc()+memset(0)
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/amso1100')
-rw-r--r--drivers/infiniband/hw/amso1100/c2_rnic.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/amso1100/c2_rnic.c b/drivers/infiniband/hw/amso1100/c2_rnic.c
index 85cfae4cad7..8c81992fa6d 100644
--- a/drivers/infiniband/hw/amso1100/c2_rnic.c
+++ b/drivers/infiniband/hw/amso1100/c2_rnic.c
@@ -459,13 +459,12 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev)
459 IB_DEVICE_MEM_WINDOW); 459 IB_DEVICE_MEM_WINDOW);
460 460
461 /* Allocate the qptr_array */ 461 /* Allocate the qptr_array */
462 c2dev->qptr_array = vmalloc(C2_MAX_CQS * sizeof(void *)); 462 c2dev->qptr_array = vzalloc(C2_MAX_CQS * sizeof(void *));
463 if (!c2dev->qptr_array) { 463 if (!c2dev->qptr_array) {
464 return -ENOMEM; 464 return -ENOMEM;
465 } 465 }
466 466
467 /* Inialize the qptr_array */ 467 /* Initialize the qptr_array */
468 memset(c2dev->qptr_array, 0, C2_MAX_CQS * sizeof(void *));
469 c2dev->qptr_array[0] = (void *) &c2dev->req_vq; 468 c2dev->qptr_array[0] = (void *) &c2dev->req_vq;
470 c2dev->qptr_array[1] = (void *) &c2dev->rep_vq; 469 c2dev->qptr_array[1] = (void *) &c2dev->rep_vq;
471 c2dev->qptr_array[2] = (void *) &c2dev->aeq; 470 c2dev->qptr_array[2] = (void *) &c2dev->aeq;