mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
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:
parent
64b8d27e9a
commit
5231b480d4
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user