diff --git a/rest/config.go b/rest/config.go index d61ca203..81e3cbd6 100644 --- a/rest/config.go +++ b/rest/config.go @@ -571,10 +571,7 @@ func LoadTLSFiles(c *Config) error { } c.KeyData, err = dataFromSliceOrFile(c.KeyData, c.KeyFile) - if err != nil { - return err - } - return nil + return err } // dataFromSliceOrFile returns data from the slice (if non-empty), or from the file, diff --git a/transport/transport.go b/transport/transport.go index 8ba7056d..ff0efc33 100644 --- a/transport/transport.go +++ b/transport/transport.go @@ -157,10 +157,7 @@ func loadTLSFiles(c *Config) error { } c.TLS.KeyData, err = dataFromSliceOrFile(c.TLS.KeyData, c.TLS.KeyFile) - if err != nil { - return err - } - return nil + return err } // dataFromSliceOrFile returns data from the slice (if non-empty), or from the file,