lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220207103626.103256-1-jiapeng.chong@linux.alibaba.com>
Date:   Mon,  7 Feb 2022 18:36:26 +0800
From:   Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To:     andy@...nel.org
Cc:     linux-kernel@...r.kernel.org,
        Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
        Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH] lib/test_string.c: return -ENOMEM on memset16_selftest allocation failure

Clean up the following smatch warning:

lib/test_string.c:14 memset16_selftest() warn: returning -1 instead of
-ENOMEM is sloppy.

Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
---
 lib/test_string.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/test_string.c b/lib/test_string.c
index 9dfd6f52de92..f23d6cd2d9c7 100644
--- a/lib/test_string.c
+++ b/lib/test_string.c
@@ -11,7 +11,7 @@ static __init int memset16_selftest(void)
 
 	p = kmalloc(256 * 2 * 2, GFP_KERNEL);
 	if (!p)
-		return -1;
+		return -ENOMEM;
 
 	for (i = 0; i < 256; i++) {
 		for (j = 0; j < 256; j++) {
-- 
2.20.1.7.g153144c

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ