[libvirt PATCH 07/10] virSCSIVHostOpenVhostSCSI: Cleanup
Tim Wiederhake
twiederh at redhat.com
Mon Nov 8 12:17:37 UTC 2021
Remove unnecessary label, goto, and closing of not-open file descriptor.
Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
---
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
More information about the libvir-list
mailing list