mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 05:25:18 +00:00
qemu_hotplug: Resolve DEADCODE coverity error
Remove unused 'cgroup' variable in qemuDomainAttachDeviceDiskLive() to resolve coverity DEADCODE complaint
This commit is contained in:
parent
461b1c8b7b
commit
5a8352f234
@ -683,7 +683,6 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
|
|||||||
virDomainDiskDefPtr orig_disk = NULL;
|
virDomainDiskDefPtr orig_disk = NULL;
|
||||||
virDomainDeviceDefPtr dev_copy = NULL;
|
virDomainDeviceDefPtr dev_copy = NULL;
|
||||||
virDomainDiskDefPtr tmp = NULL;
|
virDomainDiskDefPtr tmp = NULL;
|
||||||
virCgroupPtr cgroup = NULL;
|
|
||||||
virCapsPtr caps = NULL;
|
virCapsPtr caps = NULL;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
@ -773,10 +772,10 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret != 0 && cgroup) {
|
if (ret != 0 &&
|
||||||
if (qemuTeardownDiskCgroup(vm, disk) < 0)
|
qemuTeardownDiskCgroup(vm, disk) < 0) {
|
||||||
VIR_WARN("Failed to teardown cgroup for disk path %s",
|
VIR_WARN("Failed to teardown cgroup for disk path %s",
|
||||||
NULLSTR(disk->src));
|
NULLSTR(disk->src));
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user