* [PATCH] RDMA/cxgb4: Fix missing error code in create_qp()
@ 2021-06-01 11:07 Jiapeng Chong
2021-06-04 15:03 ` Jason Gunthorpe
0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2021-06-01 11:07 UTC (permalink / raw)
To: bharat; +Cc: dledford, jgg, linux-rdma, linux-kernel, Jiapeng Chong
The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'ret'.
Eliminate the follow smatch warning:
drivers/infiniband/hw/cxgb4/qp.c:298 create_qp() warn: missing error
code 'ret'.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/infiniband/hw/cxgb4/qp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
index d109bb3..c940374 100644
--- a/drivers/infiniband/hw/cxgb4/qp.c
+++ b/drivers/infiniband/hw/cxgb4/qp.c
@@ -295,6 +295,7 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq,
if (user && (!wq->sq.bar2_pa || (need_rq && !wq->rq.bar2_pa))) {
pr_warn("%s: sqid %u or rqid %u not in BAR2 range\n",
pci_name(rdev->lldi.pdev), wq->sq.qid, wq->rq.qid);
+ ret = -EINVAL;
goto free_dma;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] RDMA/cxgb4: Fix missing error code in create_qp()
2021-06-01 11:07 [PATCH] RDMA/cxgb4: Fix missing error code in create_qp() Jiapeng Chong
@ 2021-06-04 15:03 ` Jason Gunthorpe
0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2021-06-04 15:03 UTC (permalink / raw)
To: Jiapeng Chong; +Cc: bharat, dledford, linux-rdma, linux-kernel
On Tue, Jun 01, 2021 at 07:07:49PM +0800, Jiapeng Chong wrote:
> The error code is missing in this code scenario, add the error code
> '-EINVAL' to the return value 'ret'.
>
> Eliminate the follow smatch warning:
>
> drivers/infiniband/hw/cxgb4/qp.c:298 create_qp() warn: missing error
> code 'ret'.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
> drivers/infiniband/hw/cxgb4/qp.c | 1 +
> 1 file changed, 1 insertion(+)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-04 15:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 11:07 [PATCH] RDMA/cxgb4: Fix missing error code in create_qp() Jiapeng Chong
2021-06-04 15:03 ` Jason Gunthorpe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.