node_device: remove unneeded cleanup labels

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Daniel Henrique Barboza 2019-10-21 15:18:56 -03:00 committed by Ján Tomko
parent 64b8d27e9a
commit 5231b480d4
2 changed files with 5 additions and 14 deletions

View File

@ -587,20 +587,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;
return -1;
ret = 0;
cleanup:
return ret;
return 0;
}
int

View File

@ -1259,7 +1259,6 @@ udevSetParent(struct udev_device *device,
const char *parent_sysfs_path = NULL;
virNodeDeviceObjPtr obj = NULL;
virNodeDeviceDefPtr objdef;
int ret = -1;
parent_device = device;
do {
@ -1273,7 +1272,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,
@ -1290,10 +1289,7 @@ udevSetParent(struct udev_device *device,
if (!def->parent)
def->parent = g_strdup("computer");
ret = 0;
cleanup:
return ret;
return 0;
}