From e02a3d9f5ba3bd9fa7f21596a6ee784bb58053f9 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Mon, 15 Jan 2018 21:35:30 +0000 Subject: [PATCH] Fix golint error PR #36011 fixed almost all of the golint issues though there is still one golint error: https://goreportcard.com/report/github.com/docker/docker#golint ``` Golint is a linter for Go source code. docker/daemon/reload.go Line 64: warning: redundant if ...; err != nil check, just return error instead. (golint) ``` This fix fixes the last one. Signed-off-by: Yong Tang --- daemon/reload.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/daemon/reload.go b/daemon/reload.go index a20eb688f4..0bbda29234 100644 --- a/daemon/reload.go +++ b/daemon/reload.go @@ -61,10 +61,7 @@ func (daemon *Daemon) Reload(conf *config.Config) (err error) { if err := daemon.reloadLiveRestore(conf, attributes); err != nil { return err } - if err := daemon.reloadNetworkDiagnosticPort(conf, attributes); err != nil { - return err - } - return nil + return daemon.reloadNetworkDiagnosticPort(conf, attributes) } // reloadDebug updates configuration with Debug option