diff --git a/pkg/cephfs/util.go b/pkg/cephfs/util.go index 7349b8984..44b93cc13 100644 --- a/pkg/cephfs/util.go +++ b/pkg/cephfs/util.go @@ -93,11 +93,8 @@ func storeCephCredentials(volID volumeID, cr *credentials) error { VolumeID: volID, } - if err := secret.writeToFile(); err != nil { - return err - } - - return nil + err := secret.writeToFile() + return err } //