From c0334fcc609100d5b05e5bce3fddf029cf786e93 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 29 Dec 2020 11:56:20 +0100 Subject: [PATCH] fix up cxgb4 patch for 4.9 and 4.19 --- .../rdma-cxgb4-validate-the-number-of-cqes.patch | 11 +++-------- .../rdma-cxgb4-validate-the-number-of-cqes.patch | 11 +++-------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/queue-4.19/rdma-cxgb4-validate-the-number-of-cqes.patch b/queue-4.19/rdma-cxgb4-validate-the-number-of-cqes.patch index f40f4d6fed1..81747bf9a4b 100644 --- a/queue-4.19/rdma-cxgb4-validate-the-number-of-cqes.patch +++ b/queue-4.19/rdma-cxgb4-validate-the-number-of-cqes.patch @@ -16,23 +16,18 @@ Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- - drivers/infiniband/hw/cxgb4/cq.c | 3 +++ + drivers/infiniband/hw/cxgb4/cq.c | 3 +++ 1 file changed, 3 insertions(+) -diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c -index 1fd8798d91a73..beba761902449 100644 --- a/drivers/infiniband/hw/cxgb4/cq.c +++ b/drivers/infiniband/hw/cxgb4/cq.c -@@ -1012,6 +1012,9 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev, +@@ -1012,6 +1012,9 @@ struct ib_cq *c4iw_create_cq(struct ib_d rhp = to_c4iw_dev(ibdev); + if (entries < 1 || entries > ibdev->attrs.max_cqe) -+ return -EINVAL; ++ return ERR_PTR(-EINVAL); + if (vector >= rhp->rdev.lldi.nciq) return ERR_PTR(-EINVAL); --- -2.27.0 - diff --git a/queue-4.9/rdma-cxgb4-validate-the-number-of-cqes.patch b/queue-4.9/rdma-cxgb4-validate-the-number-of-cqes.patch index 65a58412238..df9f194aa98 100644 --- a/queue-4.9/rdma-cxgb4-validate-the-number-of-cqes.patch +++ b/queue-4.9/rdma-cxgb4-validate-the-number-of-cqes.patch @@ -16,23 +16,18 @@ Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- - drivers/infiniband/hw/cxgb4/cq.c | 3 +++ + drivers/infiniband/hw/cxgb4/cq.c | 3 +++ 1 file changed, 3 insertions(+) -diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c -index a856371bbe58c..501f496f4e1a1 100644 --- a/drivers/infiniband/hw/cxgb4/cq.c +++ b/drivers/infiniband/hw/cxgb4/cq.c -@@ -893,6 +893,9 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev, +@@ -893,6 +893,9 @@ struct ib_cq *c4iw_create_cq(struct ib_d rhp = to_c4iw_dev(ibdev); + if (entries < 1 || entries > ibdev->attrs.max_cqe) -+ return -EINVAL; ++ return ERR_PTR(-EINVAL); + if (vector >= rhp->rdev.lldi.nciq) return ERR_PTR(-EINVAL); --- -2.27.0 - -- 2.47.3