提交 5a8352f2 编写于 作者: J John Ferlan

qemu_hotplug: Resolve DEADCODE coverity error

Remove unused 'cgroup' variable in qemuDomainAttachDeviceDiskLive() to
resolve coverity DEADCODE complaint
上级 461b1c8b
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册