Module Name:    src
Committed By:   riastradh
Date:           Tue Apr 11 13:06:21 UTC 2023

Modified Files:
        src/sys/kern: subr_thmap.c

Log Message:
thmap(9): kmem_zalloc(KM_SLEEP) never fails.  Prune dead branch.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/kern/subr_thmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/subr_thmap.c
diff -u src/sys/kern/subr_thmap.c:1.12 src/sys/kern/subr_thmap.c:1.13
--- src/sys/kern/subr_thmap.c:1.12	Sat Apr  9 23:51:57 2022
+++ src/sys/kern/subr_thmap.c	Tue Apr 11 13:06:21 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_thmap.c,v 1.12 2022/04/09 23:51:57 riastradh Exp $	*/
+/*	$NetBSD: subr_thmap.c,v 1.13 2023/04/11 13:06:21 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2018 Mindaugas Rasiukevicius <rmind at noxt eu>
@@ -112,7 +112,7 @@
 #include "utils.h"
 #endif
 
-THMAP_RCSID("$NetBSD: subr_thmap.c,v 1.12 2022/04/09 23:51:57 riastradh Exp $");
+THMAP_RCSID("$NetBSD: subr_thmap.c,v 1.13 2023/04/11 13:06:21 riastradh Exp $");
 
 #include <crypto/blake2/blake2s.h>
 
@@ -980,9 +980,6 @@ thmap_create(uintptr_t baseptr, const th
 		return NULL;
 	}
 	thmap = kmem_zalloc(sizeof(thmap_t), KM_SLEEP);
-	if (!thmap) {
-		return NULL;
-	}
 	thmap->baseptr = baseptr;
 	thmap->ops = ops ? ops : &thmap_default_ops;
 	thmap->flags = flags;

Reply via email to