diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go index 08be3add466..ab1e2d0e39d 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go @@ -173,9 +173,7 @@ func (ss *scaleSet) newVMSSVirtualMachinesCache() (*azcache.TimedCache, error) { } localCache.Store(computerName, vmssVMCacheEntry) - if _, exists := oldCache[computerName]; exists { - delete(oldCache, computerName) - } + delete(oldCache, computerName) } }