Patch "RDMA/cxgb4: Fix missing error code in create_qp()" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    RDMA/cxgb4: Fix missing error code in create_qp()

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rdma-cxgb4-fix-missing-error-code-in-create_qp.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 51f3db4ca09b9b4de59f4d568d2098ec88351ea0
Author: Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx>
Date:   Tue Jun 1 19:07:49 2021 +0800

    RDMA/cxgb4: Fix missing error code in create_qp()
    
    [ Upstream commit aeb27bb76ad8197eb47890b1ff470d5faf8ec9a5 ]
    
    The error code is missing in this code scenario so 0 will be returned. Add
    the error code '-EINVAL' to the return value 'ret'.
    
    Eliminates the follow smatch warning:
    
    drivers/infiniband/hw/cxgb4/qp.c:298 create_qp() warn: missing error code 'ret'.
    
    Link: https://lore.kernel.org/r/1622545669-20625-1-git-send-email-jiapeng.chong@xxxxxxxxxxxxxxxxx
    Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
    Signed-off-by: Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx>
    Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
index e7472f0da59d..3ac08f47a8ce 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;
 	}
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux