Patch "NTB: perf: Fix an error code in perf_setup_inbuf()" has been added to the 5.10-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: perf: Fix an error code in perf_setup_inbuf()

to the 5.10-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-perf-fix-an-error-code-in-perf_setup_inbuf.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 122667db6ddc43394a632c9f5c8a2d15b642db13
Author: Yang Li <yang.lee@xxxxxxxxxxxxxxxxx>
Date:   Mon Jun 7 16:40:36 2021 +0800

    NTB: perf: Fix an error code in perf_setup_inbuf()
    
    [ Upstream commit 0097ae5f7af5684f961a5f803ff7ad3e6f933668 ]
    
    When the function IS_ALIGNED() returns false, the value of ret is 0.
    So, we set ret to -EINVAL to indicate this error.
    
    Clean up smatch warning:
    drivers/ntb/test/ntb_perf.c:602 perf_setup_inbuf() warn: missing error
    code 'ret'.
    
    Reported-by: Abaci Robot <abaci@xxxxxxxxxxxxxxxxx>
    Signed-off-by: Yang Li <yang.lee@xxxxxxxxxxxxxxxxx>
    Reviewed-by: Serge Semin <fancer.lancer@xxxxxxxxx>
    Signed-off-by: Jon Mason <jdmason@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c
index 89df1350fefd..65e1e5cf1b29 100644
--- a/drivers/ntb/test/ntb_perf.c
+++ b/drivers/ntb/test/ntb_perf.c
@@ -598,6 +598,7 @@ static int perf_setup_inbuf(struct perf_peer *peer)
 		return -ENOMEM;
 	}
 	if (!IS_ALIGNED(peer->inbuf_xlat, xlat_align)) {
+		ret = -EINVAL;
 		dev_err(&perf->ntb->dev, "Unaligned inbuf allocated\n");
 		goto err_free_inbuf;
 	}



[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