diff --git a/pkg/cephfs/cephuser.go b/pkg/cephfs/cephuser.go index 340a8dbec..fda2a5e6b 100644 --- a/pkg/cephfs/cephuser.go +++ b/pkg/cephfs/cephuser.go @@ -69,7 +69,7 @@ func getCephUser(adminCr *credentials, volID volumeID) (*cephEntity, error) { // Contains non-json data: "exported keyring for ENTITY\n\n" offset := bytes.Index(out, []byte("[{")) - if json.NewDecoder(bytes.NewReader(out[offset:])).Decode(&ents); err != nil { + if err = json.NewDecoder(bytes.NewReader(out[offset:])).Decode(&ents); err != nil { return nil, fmt.Errorf("failed to decode json: %v", err) }