From e0fed7f44ead371308a269b93c0cd0ef6cb8b221 Mon Sep 17 00:00:00 2001 From: Damien Mathieu <42@dmathieu.com> Date: Thu, 25 Apr 2019 10:54:20 +0200 Subject: [PATCH] remove redundant error check There is no new err being set since `configMapWatcher.Start`. So there is no way this condition could be true here. --- cmd/webhook/main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/webhook/main.go b/cmd/webhook/main.go index 39d94b4e5dc..95e2f53b3cb 100644 --- a/cmd/webhook/main.go +++ b/cmd/webhook/main.go @@ -91,9 +91,7 @@ func main() { }, Logger: logger, } - if err != nil { - logger.Fatal("Failed to create the admission controller", zap.Error(err)) - } + if err := controller.Run(stopCh); err != nil { logger.Fatal("Error running admission controller", zap.Error(err)) }