From b6a0ed7c78dd45937e404706620467bef61c308d Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Tue, 23 Apr 2024 12:19:08 -0400 Subject: 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 -- cgit v1.2.3