diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 4c3f7da394..cb566d424f 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -163,8 +163,12 @@ qemuHotplugWaitForTrayEject(virQEMUDriverPtr driver, return -1; if (rc > 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("timed out waiting for disk tray status update")); + /* the caller called qemuMonitorEjectMedia which usually reports an + * error. Report the failure in an off-chance that it didn't. */ + if (!virGetLastError()) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("timed out waiting for disk tray status update")); + } return -1; } }