mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-31 00:45:18 +00:00
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:
parent
ddf48de4c8
commit
9dcfd7030a
@ -90,15 +90,10 @@ virSCSIVHostOpenVhostSCSI(int *vhostfd)
|
|||||||
|
|
||||||
if (*vhostfd < 0) {
|
if (*vhostfd < 0) {
|
||||||
virReportSystemError(errno, _("Failed to open %s"), VHOST_SCSI_DEVICE);
|
virReportSystemError(errno, _("Failed to open %s"), VHOST_SCSI_DEVICE);
|
||||||
goto error;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
|
||||||
VIR_FORCE_CLOSE(*vhostfd);
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user