summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/cxgb4/device.c
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2016-09-17 03:41:37 +0300
committerDoug Ledford <dledford@redhat.com>2016-12-08 18:03:36 +0300
commit15f7e3c21b76598bc6e5816d2577ce843b2b963f (patch)
tree7f1930f5856063f5c2d9dab9a053c0ed48100241 /drivers/infiniband/hw/cxgb4/device.c
parente37a79e5d4cac3831fac3d4afbf2461f56b4b7bd (diff)
downloadlinux-15f7e3c21b76598bc6e5816d2577ce843b2b963f.tar.xz
iw_cxgb4: Fix error return code in c4iw_rdev_open()
Fix to return error code -ENOMEM from the __get_free_page() error handling case instead of 0, as done elsewhere in this function. Fixes: 05eb23893c2c ("cxgb4/iw_cxgb4: Doorbell Drop Avoidance Bug Fixes") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/device.c')
-rw-r--r--drivers/infiniband/hw/cxgb4/device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c
index 93e3d270a98a..b99dc9e0ffb2 100644
--- a/drivers/infiniband/hw/cxgb4/device.c
+++ b/drivers/infiniband/hw/cxgb4/device.c
@@ -828,8 +828,10 @@ static int c4iw_rdev_open(struct c4iw_rdev *rdev)
}
rdev->status_page = (struct t4_dev_status_page *)
__get_free_page(GFP_KERNEL);
- if (!rdev->status_page)
+ if (!rdev->status_page) {
+ err = -ENOMEM;
goto destroy_ocqp_pool;
+ }
rdev->status_page->qp_start = rdev->lldi.vr->qp.start;
rdev->status_page->qp_size = rdev->lldi.vr->qp.size;
rdev->status_page->cq_start = rdev->lldi.vr->cq.start;