aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/cxgb4/device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c
index e29172c2afc..8e70953c4f4 100644
--- a/drivers/infiniband/hw/cxgb4/device.c
+++ b/drivers/infiniband/hw/cxgb4/device.c
@@ -392,7 +392,7 @@ static struct c4iw_dev *c4iw_alloc(const struct cxgb4_lld_info *infop)
392 devp = (struct c4iw_dev *)ib_alloc_device(sizeof(*devp)); 392 devp = (struct c4iw_dev *)ib_alloc_device(sizeof(*devp));
393 if (!devp) { 393 if (!devp) {
394 printk(KERN_ERR MOD "Cannot allocate ib device\n"); 394 printk(KERN_ERR MOD "Cannot allocate ib device\n");
395 return NULL; 395 return ERR_PTR(-ENOMEM);
396 } 396 }
397 devp->rdev.lldi = *infop; 397 devp->rdev.lldi = *infop;
398 398
@@ -414,7 +414,7 @@ static struct c4iw_dev *c4iw_alloc(const struct cxgb4_lld_info *infop)
414 mutex_unlock(&dev_mutex); 414 mutex_unlock(&dev_mutex);
415 printk(KERN_ERR MOD "Unable to open CXIO rdev err %d\n", ret); 415 printk(KERN_ERR MOD "Unable to open CXIO rdev err %d\n", ret);
416 ib_dealloc_device(&devp->ibdev); 416 ib_dealloc_device(&devp->ibdev);
417 return NULL; 417 return ERR_PTR(ret);
418 } 418 }
419 419
420 idr_init(&devp->cqidr); 420 idr_init(&devp->cqidr);
@@ -444,7 +444,7 @@ static void *c4iw_uld_add(const struct cxgb4_lld_info *infop)
444 DRV_VERSION); 444 DRV_VERSION);
445 445
446 dev = c4iw_alloc(infop); 446 dev = c4iw_alloc(infop);
447 if (!dev) 447 if (IS_ERR(dev))
448 goto out; 448 goto out;
449 449
450 PDBG("%s found device %s nchan %u nrxq %u ntxq %u nports %u\n", 450 PDBG("%s found device %s nchan %u nrxq %u ntxq %u nports %u\n",