diff --git a/config/config.go b/config/config.go index 9392eb797b95b..bb1d3daf94309 100644 --- a/config/config.go +++ b/config/config.go @@ -821,7 +821,7 @@ func (c *Config) Valid() error { if c.Security.SkipGrantTable && !hasRootPrivilege() { return fmt.Errorf("TiDB run with skip-grant-table need root privilege") } - if _, ok := ValidStorage[c.Store]; !ok { + if !ValidStorage[c.Store] { nameList := make([]string, 0, len(ValidStorage)) for k, v := range ValidStorage { if v {