git: 6a0ed6fe27ec - stable/14 - tests: Stop checking for failures from malloc(M_WAITOK)

From: Zhenlei Huang <zlei_at_FreeBSD.org>
Date: Mon, 30 Sep 2024 04:45:17 UTC
The branch stable/14 has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=6a0ed6fe27ecd9f9b51a6c29bc15f5dbf2ab6c4a

commit 6a0ed6fe27ecd9f9b51a6c29bc15f5dbf2ab6c4a
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2024-09-03 10:25:21 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2024-09-30 04:44:18 +0000

    tests: Stop checking for failures from malloc(M_WAITOK)
    
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D45852
    
    (cherry picked from commit aac6c41d4ba9b0a1aef561f6c4bfd284ab369ebf)
---
 sys/tests/framework/kern_testfrwk.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/sys/tests/framework/kern_testfrwk.c b/sys/tests/framework/kern_testfrwk.c
index 19714fa76f52..c6b46542a205 100644
--- a/sys/tests/framework/kern_testfrwk.c
+++ b/sys/tests/framework/kern_testfrwk.c
@@ -192,10 +192,6 @@ kerntest_execute(SYSCTL_HANDLER_ARGS)
 	}
 	/* Grab some memory */
 	kte = malloc(sizeof(struct kern_test_entry), M_KTFRWK, M_WAITOK);
-	if (kte == NULL) {
-		error = ENOMEM;
-		goto out;
-	}
 	KTFRWK_LOCK();
 	TAILQ_FOREACH(li, &kfrwk.kfrwk_testlist, next) {
 		if (strcmp(li->name, kt.name) == 0) {
@@ -244,10 +240,6 @@ kern_testframework_register(const char *name, kerntfunc func)
 		return (E2BIG);
 	}
 	te = malloc(sizeof(struct kern_test_list), M_KTFRWK, M_WAITOK);
-	if (te == NULL) {
-		error = ENOMEM;
-		goto out;
-	}
 	KTFRWK_LOCK();
 	/* First does it already exist? */
 	TAILQ_FOREACH(li, &kfrwk.kfrwk_testlist, next) {