[libvirt PATCH 07/10] virSCSIVHostOpenVhostSCSI: Cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux