Signed-off-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx> --- src/bhyve/bhyve_device.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/bhyve/bhyve_device.c b/src/bhyve/bhyve_device.c index 4913be8422..ddbe20d31d 100644 --- a/src/bhyve/bhyve_device.c +++ b/src/bhyve/bhyve_device.c @@ -36,7 +36,6 @@ bhyveCollectPCIAddress(virDomainDefPtr def G_GNUC_UNUSED, virDomainDeviceInfoPtr info, void *opaque) { - int ret = -1; if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE) return 0; @@ -56,12 +55,10 @@ bhyveCollectPCIAddress(virDomainDefPtr def G_GNUC_UNUSED, if (virDomainPCIAddressReserveAddr(addrs, addr, VIR_PCI_CONNECT_TYPE_PCI_DEVICE, 0) < 0) { - goto cleanup; + return -1; } - ret = 0; - cleanup: - return ret; + return 0; } virDomainPCIAddressSetPtr @@ -169,13 +166,11 @@ int bhyveDomainAssignPCIAddresses(virDomainDefPtr def, virDomainPCIAddressSetPtr addrs = NULL; bhyveDomainObjPrivatePtr priv = NULL; - int ret = -1; - if (!(addrs = bhyveDomainPCIAddressSetCreate(def, 1))) - goto cleanup; + return -1; if (bhyveAssignDevicePCISlots(def, addrs) < 0) - goto cleanup; + return -1; if (obj && obj->privateData) { priv = obj->privateData; @@ -188,10 +183,7 @@ int bhyveDomainAssignPCIAddresses(virDomainDefPtr def, } } - ret = 0; - - cleanup: - return ret; + return 0; } int bhyveDomainAssignAddresses(virDomainDefPtr def, virDomainObjPtr obj) -- 2.21.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list