virSCSIVHostOpenVhostSCSI: Cleanup

Remove unnecessary label, goto, and closing of not-open file descriptor.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Tim Wiederhake 2021-11-08 12:03:43 +01:00
parent ddf48de4c8
commit 9dcfd7030a

View File

@ -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;
}