[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 28/59] qga/commands-win32.c: remove 'out' label in get_pci_inf
From: |
Daniel Henrique Barboza |
Subject: |
[PATCH v1 28/59] qga/commands-win32.c: remove 'out' label in get_pci_info |
Date: |
Mon, 6 Jan 2020 15:23:54 -0300 |
'out' can be replaced by 'return pci' instead.
CC: Stefan Weil <address@hidden>
Signed-off-by: Daniel Henrique Barboza <address@hidden>
---
qga/commands-win32.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 2461fd19bf..c520a341df 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -513,7 +513,7 @@ static GuestPCIAddress *get_pci_info(int number, Error
**errp)
DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
if (dev_info == INVALID_HANDLE_VALUE) {
error_setg_win32(errp, GetLastError(), "failed to get devices tree");
- goto out;
+ return pci;
}
g_debug("enumerating devices");
@@ -584,7 +584,7 @@ static GuestPCIAddress *get_pci_info(int number, Error
**errp)
} else {
error_setg_win32(errp, GetLastError(),
"failed to get device instance ID");
- goto out;
+ return pci;
}
}
@@ -598,14 +598,14 @@ static GuestPCIAddress *get_pci_info(int number, Error
**errp)
g_error("CM_Locate_DevInst failed with code %lx", cr);
error_setg_win32(errp, GetLastError(),
"failed to get device instance");
- goto out;
+ return pci;
}
cr = CM_Get_Parent(&parent_dev_inst, dev_inst, 0);
if (cr != CR_SUCCESS) {
g_error("CM_Get_Parent failed with code %lx", cr);
error_setg_win32(errp, GetLastError(),
"failed to get parent device instance");
- goto out;
+ return pci;
}
cr = CM_Get_Device_ID_Size(&dev_id_size, parent_dev_inst, 0);
@@ -613,7 +613,7 @@ static GuestPCIAddress *get_pci_info(int number, Error
**errp)
g_error("CM_Get_Device_ID_Size failed with code %lx", cr);
error_setg_win32(errp, GetLastError(),
"failed to get parent device ID length");
- goto out;
+ return pci;
}
++dev_id_size;
@@ -628,7 +628,7 @@ static GuestPCIAddress *get_pci_info(int number, Error
**errp)
g_error("CM_Get_Device_ID failed with code %lx", cr);
error_setg_win32(errp, GetLastError(),
"failed to get parent device ID");
- goto out;
+ return pci;
}
}
@@ -642,14 +642,14 @@ static GuestPCIAddress *get_pci_info(int number, Error
**errp)
if (parent_dev_info == INVALID_HANDLE_VALUE) {
error_setg_win32(errp, GetLastError(),
"failed to get parent device");
- goto out;
+ return pci;
}
parent_dev_info_data.cbSize = sizeof(SP_DEVINFO_DATA);
if (!SetupDiEnumDeviceInfo(parent_dev_info, 0, &parent_dev_info_data))
{
error_setg_win32(errp, GetLastError(),
"failed to get parent device data");
- goto out;
+ return pci;
}
for (j = 0;
@@ -731,7 +731,6 @@ static GuestPCIAddress *get_pci_info(int number, Error
**errp)
free_dev_info:
SetupDiDestroyDeviceInfoList(dev_info);
-out:
return pci;
}
--
2.24.1
- Re: [PATCH v1 37/59] s390x/event-facility.c: remove unneeded labels, (continued)
- [PATCH v1 40/59] hsb/hcd-ehci.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 43/59] i386/amd_iommu.c: remove unneeded label in amdvi_int_remap_msi(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 50/59] rdma/rdma_backend.c: remove unneeded label in rdma_backend_init(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 16/59] block/gluster.c: remove unneeded 'exit' label, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 21/59] block/backup.c remove unneeded 'out' label in backup_run(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 22/59] block/vmdk.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 28/59] qga/commands-win32.c: remove 'out' label in get_pci_info,
Daniel Henrique Barboza <=
- [PATCH v1 30/59] util/module.c: remove unneeded label in module_load_file(), Daniel Henrique Barboza, 2020/01/06
- Re: [PATCH v1 00/59] trivial unneeded labels cleanup, Max Reitz, 2020/01/07
- Re: [PATCH v1 00/59] trivial unneeded labels cleanup, Eric Blake, 2020/01/10