From 52959abc9535380f07fa95376bc5e8efc515bc5d Mon Sep 17 00:00:00 2001 From: DrAuYueng Date: Fri, 14 Jun 2024 22:28:07 +0800 Subject: [PATCH] Remove redundant nil check --- pkg/registry/core/service/ipallocator/ipallocator.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/registry/core/service/ipallocator/ipallocator.go b/pkg/registry/core/service/ipallocator/ipallocator.go index 1f90c992b92..fd6d07d0d06 100644 --- a/pkg/registry/core/service/ipallocator/ipallocator.go +++ b/pkg/registry/core/service/ipallocator/ipallocator.go @@ -102,9 +102,6 @@ func NewIPAllocator( // of having to do conversions with IP addresses. // Don't allocate the network's ".0" address. ipFirst := prefix.Masked().Addr().Next() - if err != nil { - return nil, err - } // Use the broadcast address as last address for IPv6 ipLast, err := broadcastAddress(prefix) if err != nil {