[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 19/59] block/ssh.c: remove unneeded labels, (continued)
- [PATCH v1 20/59] block/vpc.c: remove unneeded 'fail' label in create_dynamic_disk(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 18/59] qcow2-refcount.c: remove unneeded 'fail' label in qcow2_refcount_init(), 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 23/59] block/vxhs.c: remove unneeded 'out' label in vxhs_iio_callback(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 24/59] block/vhdx-log.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 25/59] block/vhdx.c: remove unneeded 'exit' labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 26/59] block/replication.c: remove unneeded label in replication_co_writev, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 27/59] crypto/block-luks.c: remove unneeded label in qcrypto_block_luks_find_key, 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 29/59] cryptodev-vhost.c: remove unneeded 'err' label in cryptodev_vhost_start, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 30/59] util/module.c: remove unneeded label in module_load_file(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 31/59] util/aio-posix.c: remove unneeded 'out' label in aio_epoll, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 32/59] qemu-img.c: remove 'out4' label in img_compare, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 33/59] ipmi/ipmi_bmc_sim.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 34/59] ipmi/ipmi_bt.c: remove unneeded label in ipmi_bt_handle_event, Daniel Henrique Barboza, 2020/01/06