Signed-off-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx> --- src/node_device/node_device_driver.c | 11 +++-------- src/node_device/node_device_udev.c | 8 ++------ 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c index 7ef55f45e9..38a4da0b9b 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -588,20 +588,15 @@ int nodeConnectNodeDeviceEventDeregisterAny(virConnectPtr conn, int callbackID) { - int ret = -1; - if (virConnectNodeDeviceEventDeregisterAnyEnsureACL(conn) < 0) - goto cleanup; + return -1; if (virObjectEventStateDeregisterID(conn, driver->nodeDeviceEventState, callbackID, true) < 0) - goto cleanup; - - ret = 0; + return -1; - cleanup: - return ret; + return 0; } int diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c index 525e71f80c..0ebf4bebeb 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -1264,7 +1264,6 @@ udevSetParent(struct udev_device *device, const char *parent_sysfs_path = NULL; virNodeDeviceObjPtr obj = NULL; virNodeDeviceDefPtr objdef; - int ret = -1; parent_device = device; do { @@ -1278,7 +1277,7 @@ udevSetParent(struct udev_device *device, virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not get syspath for parent of '%s'"), udev_device_get_syspath(parent_device)); - goto cleanup; + return -1; } if ((obj = virNodeDeviceObjListFindBySysfsPath(driver->devs, @@ -1295,10 +1294,7 @@ udevSetParent(struct udev_device *device, if (!def->parent) def->parent = g_strdup("computer"); - ret = 0; - - cleanup: - return ret; + return 0; } -- 2.21.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list