From 1a246f7bf36f5f3e39611ffc0ebf8b4a94ab27de Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Thu, 17 Jan 2019 13:31:07 +0530 Subject: [PATCH] simplify the error check Signed-off-by: Madhu Rajanna --- pkg/cephfs/util.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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 } //