diff --git a/br/pkg/task/stream.go b/br/pkg/task/stream.go index b33459bb98e2e..8596eb89d6974 100644 --- a/br/pkg/task/stream.go +++ b/br/pkg/task/stream.go @@ -1177,7 +1177,7 @@ func restoreStream( return errors.Trace(err) } defer func() { - if err = restoreGc(); err != nil { + if err := restoreGc(); err != nil { log.Error("failed to set gc enabled", zap.Error(err)) } }()