diff mbox

iw_cxgb4: Fix error return code in c4iw_rdev_open()

Message ID 1474072897-30502-1-git-send-email-weiyj.lk@gmail.com (mailing list archive)
State Accepted
Headers show

Commit Message

Wei Yongjun Sept. 17, 2016, 12:41 a.m. UTC
From: Wei Yongjun <weiyongjun1@huawei.com>

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>
---
 drivers/infiniband/hw/cxgb4/device.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


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

Comments

Steve Wise Sept. 17, 2016, 3:20 a.m. UTC | #1
> On Sep 16, 2016, at 7:41 PM, Wei Yongjun <weiyj.lk@gmail.com> wrote:
> 
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> 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>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Doug Ledford Dec. 8, 2016, 3:05 p.m. UTC | #2
On 9/16/2016 11:20 PM, Steve Wise wrote:
> 
>> On Sep 16, 2016, at 7:41 PM, Wei Yongjun <weiyj.lk@gmail.com> wrote:
>>
>> From: Wei Yongjun <weiyongjun1@huawei.com>
>>
>> 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>
> 

Thanks, applied.
diff mbox

Patch

diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c
index 3c4b212..3f7f869 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;