The branch main has been updated by markj:

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

commit b6a0ed7c78dd45937e404706620467bef61c308d
Author:     Mark Johnston <ma...@freebsd.org>
AuthorDate: 2024-04-23 16:19:08 +0000
Commit:     Mark Johnston <ma...@freebsd.org>
CommitDate: 2024-04-24 12:45:40 +0000

    wg: uma_zcreate() does not fail
    
    No functional change intended.
    
    MFC after:      1 week
---
 sys/dev/wg/if_wg.c     | 6 +++---
 sys/dev/wg/wg_cookie.c | 5 ++---
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/sys/dev/wg/if_wg.c b/sys/dev/wg/if_wg.c
index 57caa69bde3b..d0b75d5cbf4b 100644
--- a/sys/dev/wg/if_wg.c
+++ b/sys/dev/wg/if_wg.c
@@ -3135,9 +3135,9 @@ wg_module_init(void)
                [PR_METHOD_REMOVE] = wg_prison_remove,
        };
 
-       if ((wg_packet_zone = uma_zcreate("wg packet", sizeof(struct wg_packet),
-            NULL, NULL, NULL, NULL, 0, 0)) == NULL)
-               return (ENOMEM);
+       wg_packet_zone = uma_zcreate("wg packet", sizeof(struct wg_packet),
+            NULL, NULL, NULL, NULL, 0, 0);
+
        ret = crypto_init();
        if (ret != 0)
                return (ret);
diff --git a/sys/dev/wg/wg_cookie.c b/sys/dev/wg/wg_cookie.c
index 6ff9325c6613..80617d473471 100644
--- a/sys/dev/wg/wg_cookie.c
+++ b/sys/dev/wg/wg_cookie.c
@@ -85,9 +85,8 @@ static uma_zone_t ratelimit_zone;
 int
 cookie_init(void)
 {
-       if ((ratelimit_zone = uma_zcreate("wg ratelimit",
-           sizeof(struct ratelimit_entry), NULL, NULL, NULL, NULL, 0, 0)) == 
NULL)
-               return ENOMEM;
+       ratelimit_zone = uma_zcreate("wg ratelimit",
+           sizeof(struct ratelimit_entry), NULL, NULL, NULL, NULL, 0, 0);
 
        ratelimit_init(&ratelimit_v4);
 #ifdef INET6

Reply via email to