From: Tim Wiederhake Date: Mon, 8 Nov 2021 11:03:43 +0000 (+0100) Subject: virSCSIVHostOpenVhostSCSI: Cleanup X-Git-Tag: v7.10.0-rc1~169 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9dcfd7030a459b24c3d4befef8027dacb4f3b89f;p=thirdparty%2Flibvirt.git virSCSIVHostOpenVhostSCSI: Cleanup Remove unnecessary label, goto, and closing of not-open file descriptor. Signed-off-by: Tim Wiederhake Reviewed-by: Michal Privoznik --- 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; }