Remove unnecessary label, goto, and closing of not-open file descriptor. Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx> --- src/util/virscsivhost.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/util/virscsivhost.c b/src/util/virscsivhost.c index afbfddb0fb..487301ab64 100644 --- a/src/util/virscsivhost.c +++ b/src/util/virscsivhost.c @@ -90,15 +90,10 @@ virSCSIVHostOpenVhostSCSI(int *vhostfd) if (*vhostfd < 0) { virReportSystemError(errno, _("Failed to open %s"), VHOST_SCSI_DEVICE); - goto error; + return -1; } return 0; - - error: - VIR_FORCE_CLOSE(*vhostfd); - - return -1; } -- 2.31.1