removed unreachable code path

This commit is contained in:
Reinier Schoof 2020-02-25 21:07:15 +01:00 committed by mergify[bot]
parent 3af5e0619f
commit 8da7e4bbf9

View File

@ -55,13 +55,6 @@ func (cs *ControllerServer) createBackingVolume(ctx context.Context, volOptions
klog.Errorf(util.Log(ctx, "failed to create volume %s: %v"), volOptions.RequestName, err)
return status.Error(codes.Internal, err.Error())
}
defer func() {
if err != nil {
if errDefer := purgeVolume(ctx, volumeID(vID.FsSubvolName), cr, volOptions); errDefer != nil {
klog.Warningf(util.Log(ctx, "failed purging volume: %s (%s)"), volOptions.RequestName, errDefer)
}
}
}()
return nil
}