diff options
Diffstat (limited to 'drivers/infiniband/hw/amso1100/c2_rnic.c')
| -rw-r--r-- | drivers/infiniband/hw/amso1100/c2_rnic.c | 14 | 
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/amso1100/c2_rnic.c b/drivers/infiniband/hw/amso1100/c2_rnic.c index 85cfae4cad7..d2a6d961344 100644 --- a/drivers/infiniband/hw/amso1100/c2_rnic.c +++ b/drivers/infiniband/hw/amso1100/c2_rnic.c @@ -439,10 +439,10 @@ static int c2_rnic_close(struct c2_dev *c2dev)  /*   * Called by c2_probe to initialize the RNIC. This principally - * involves initalizing the various limits and resouce pools that + * involves initializing the various limits and resource pools that   * comprise the RNIC instance.   */ -int __devinit c2_rnic_init(struct c2_dev *c2dev) +int c2_rnic_init(struct c2_dev *c2dev)  {  	int err;  	u32 qsize, msgsize; @@ -459,13 +459,12 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev)  	     IB_DEVICE_MEM_WINDOW);  	/* Allocate the qptr_array */ -	c2dev->qptr_array = vmalloc(C2_MAX_CQS * sizeof(void *)); +	c2dev->qptr_array = vzalloc(C2_MAX_CQS * sizeof(void *));  	if (!c2dev->qptr_array) {  		return -ENOMEM;  	} -	/* Inialize the qptr_array */ -	memset(c2dev->qptr_array, 0, C2_MAX_CQS * sizeof(void *)); +	/* Initialize the qptr_array */  	c2dev->qptr_array[0] = (void *) &c2dev->req_vq;  	c2dev->qptr_array[1] = (void *) &c2dev->rep_vq;  	c2dev->qptr_array[2] = (void *) &c2dev->aeq; @@ -577,7 +576,8 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev)  		goto bail4;  	/* Initialize cached the adapter limits */ -	if (c2_rnic_query(c2dev, &c2dev->props)) +	err = c2_rnic_query(c2dev, &c2dev->props); +	if (err)  		goto bail5;  	/* Initialize the PD pool */ @@ -612,7 +612,7 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev)  /*   * Called by c2_remove to cleanup the RNIC resources.   */ -void __devexit c2_rnic_term(struct c2_dev *c2dev) +void c2_rnic_term(struct c2_dev *c2dev)  {  	/* Close the open adapter instance */  | 
