Skip to contentSkip to conversation

iw_cxgb4: Fix error return code in c4iw_rdev_open()

PATCH Applied Wei Yongjun 3 participants 3 messages Sep 17, 2016 – Dec 8, 2016 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iw_cxgb4: Fix error return code in c4iw_rdev_open()

From: Wei Yongjun <[email protected]>

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")
---
 drivers/infiniband/hw/cxgb4/device.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/infiniband/hw/cxgb4/device.c +3 -1
index 3c4b212..3f7f869 100644
@@ -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;

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1474072897-30502-1-git-send-email-weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

Acked-by
#2 lore raw
Quoted 10 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

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")

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 50446B79-8354-435D-AA7D-1084D6E52200-/Yg/[email protected]

Applied
#4 lore raw
Quoted 5 lines · Steve Wise
Quoted 5 lines · Wei Yongjun

From: Wei Yongjun <[email protected]>

Quoted 8 lines
Quoted 5 lines

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")

Thanks, applied.

Signature · 2 lines
Doug Ledford <[email protected]>
    GPG Key ID: 0E572FDD