diff --git a/pspmutating.go b/pspmutating.go index 6c7a0ee..2f88510 100644 --- a/pspmutating.go +++ b/pspmutating.go @@ -165,9 +165,6 @@ func IsPSPMutating(pspObj *v1beta1.PodSecurityPolicy) (mutating bool, fields, an } } - if len(fields) > 0 || len(annotations) > 0 { - return true, fields, annotations - } - - return false, fields, annotations + isMutating := len(fields) > 0 || len(annotations) > 0 + return isMutating, fields, annotations }