Patch "NTB: Fix an error code in ntb_msit_probe()" 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

    NTB: Fix an error code in ntb_msit_probe()

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:
     ntb-fix-an-error-code-in-ntb_msit_probe.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 ed6238b5f4d43a1b6bf102191093004c6e7bf0ee
Author: Yang Li <yang.lee@xxxxxxxxxxxxxxxxx>
Date:   Mon Jun 7 13:56:20 2021 +0800

    NTB: Fix an error code in ntb_msit_probe()
    
    [ Upstream commit 319f83ac98d7afaabab84ce5281a819a358b9895 ]
    
    When the value of nm->isr_ctx is false, the value of ret is 0.
    So, we set ret to -ENOMEM to indicate this error.
    
    Clean up smatch warning:
    drivers/ntb/test/ntb_msi_test.c:373 ntb_msit_probe() warn: missing
    error code 'ret'.
    
    Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
    Signed-off-by: Yang Li <yang.lee@xxxxxxxxxxxxxxxxx>
    Reviewed-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>
    Signed-off-by: Jon Mason <jdmason@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/ntb/test/ntb_msi_test.c b/drivers/ntb/test/ntb_msi_test.c
index 99d826ed9c34..662067dc9ce2 100644
--- a/drivers/ntb/test/ntb_msi_test.c
+++ b/drivers/ntb/test/ntb_msi_test.c
@@ -372,8 +372,10 @@ static int ntb_msit_probe(struct ntb_client *client, struct ntb_dev *ntb)
 	if (ret)
 		goto remove_dbgfs;
 
-	if (!nm->isr_ctx)
+	if (!nm->isr_ctx) {
+		ret = -ENOMEM;
 		goto remove_dbgfs;
+	}
 
 	ntb_link_enable(ntb, NTB_SPEED_AUTO, NTB_WIDTH_AUTO);
 



[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