Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- 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
-
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- 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
-