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

@ -44,7 +44,7 @@ func createRBDStorageClass(
scPath := fmt.Sprintf("%s/%s", rbdExamplePath, "storageclass.yaml")
sc, err := getStorageClass(scPath)
if err != nil {
return nil
return fmt.Errorf("failed to get sc: %w", err)
}
if name != "" {
sc.Name = name