diff --git a/test/e2e/storage/vsphere/vsphere_utils.go b/test/e2e/storage/vsphere/vsphere_utils.go index 8f0e81af29e..8cea902ca51 100644 --- a/test/e2e/storage/vsphere/vsphere_utils.go +++ b/test/e2e/storage/vsphere/vsphere_utils.go @@ -719,11 +719,10 @@ func diskIsAttached(volPath string, nodeName string) (bool, error) { nodeName) return false, err } - if device != nil { - framework.Logf("diskIsAttached found the disk %q attached on node %q", - volPath, - nodeName) + if device == nil { + return false, nil } + framework.Logf("diskIsAttached found the disk %q attached on node %q", volPath, nodeName) return true, nil }