cleanup: ineffective assignment

This commit resolves ineffective assignent of
snap.

Updates: #1586

Signed-off-by: Yati Padia <ypadia@redhat.com>
This commit is contained in:
Yati Padia 2021-07-13 14:19:11 +05:30 committed by mergify[bot]
parent 4d4a2a7814
commit c66872c3c6

View File

@ -609,8 +609,7 @@ func (cs *ControllerServer) CreateSnapshot(
} }
} }
}() }()
snap := snapshotInfo{} snap, err := doSnapshot(ctx, parentVolOptions, vid.FsSubvolName, sID.FsSnapshotName)
snap, err = doSnapshot(ctx, parentVolOptions, vid.FsSubvolName, sID.FsSnapshotName)
if err != nil { if err != nil {
return nil, status.Error(codes.Internal, err.Error()) return nil, status.Error(codes.Internal, err.Error())
} }