diff options
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/provider.c')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/provider.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/provider.c b/drivers/infiniband/hw/cxgb4/provider.c index dfc49020bb9c..8f645c83a125 100644 --- a/drivers/infiniband/hw/cxgb4/provider.c +++ b/drivers/infiniband/hw/cxgb4/provider.c | |||
@@ -486,7 +486,7 @@ int c4iw_register_device(struct c4iw_dev *dev) | |||
486 | dev->ibdev.iwcm->rem_ref = c4iw_qp_rem_ref; | 486 | dev->ibdev.iwcm->rem_ref = c4iw_qp_rem_ref; |
487 | dev->ibdev.iwcm->get_qp = c4iw_get_qp; | 487 | dev->ibdev.iwcm->get_qp = c4iw_get_qp; |
488 | 488 | ||
489 | ret = ib_register_device(&dev->ibdev); | 489 | ret = ib_register_device(&dev->ibdev, NULL); |
490 | if (ret) | 490 | if (ret) |
491 | goto bail1; | 491 | goto bail1; |
492 | 492 | ||
@@ -496,6 +496,7 @@ int c4iw_register_device(struct c4iw_dev *dev) | |||
496 | if (ret) | 496 | if (ret) |
497 | goto bail2; | 497 | goto bail2; |
498 | } | 498 | } |
499 | dev->registered = 1; | ||
499 | return 0; | 500 | return 0; |
500 | bail2: | 501 | bail2: |
501 | ib_unregister_device(&dev->ibdev); | 502 | ib_unregister_device(&dev->ibdev); |
@@ -514,5 +515,6 @@ void c4iw_unregister_device(struct c4iw_dev *dev) | |||
514 | c4iw_class_attributes[i]); | 515 | c4iw_class_attributes[i]); |
515 | ib_unregister_device(&dev->ibdev); | 516 | ib_unregister_device(&dev->ibdev); |
516 | kfree(dev->ibdev.iwcm); | 517 | kfree(dev->ibdev.iwcm); |
518 | dev->registered = 0; | ||
517 | return; | 519 | return; |
518 | } | 520 | } |