cleanup: error is not nil but returns nil

In few places the error is not nil still it
returns nil.

Updates: #1586

Signed-off-by: Yati Padia <ypadia@redhat.com>
This commit is contained in:
Yati Padia
2021-06-25 17:07:24 +05:30
committed by mergify[bot]
parent 5dc60126e4
commit c851b69160
3 changed files with 4 additions and 4 deletions

View File

@ -68,7 +68,7 @@ func createPVCAndvalidatePV(c kubernetes.Interface, pvc *v1.PersistentVolumeClai
}
err = e2epv.WaitOnPVandPVC(c, pvc.Namespace, pv, pvc)
if err != nil {
return false, nil
return false, fmt.Errorf("failed to wait for the pv and pvc to bind: %w", err)
}
return true, nil
})