mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 21:15:20 +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;
|
||||
virDomainDeviceDefPtr dev_copy = NULL;
|
||||
virDomainDiskDefPtr tmp = NULL;
|
||||
virCgroupPtr cgroup = NULL;
|
||||
virCapsPtr caps = NULL;
|
||||
int ret = -1;
|
||||
|
||||
@ -773,10 +772,10 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
|
||||
break;
|
||||
}
|
||||
|
||||
if (ret != 0 && cgroup) {
|
||||
if (qemuTeardownDiskCgroup(vm, disk) < 0)
|
||||
VIR_WARN("Failed to teardown cgroup for disk path %s",
|
||||
NULLSTR(disk->src));
|
||||
if (ret != 0 &&
|
||||
qemuTeardownDiskCgroup(vm, disk) < 0) {
|
||||
VIR_WARN("Failed to teardown cgroup for disk path %s",
|
||||
NULLSTR(disk->src));
|
||||
}
|
||||
|
||||
end:
|
||||
|
Loading…
x
Reference in New Issue
Block a user