aboutsummaryrefslogtreecommitdiff
path: root/device-hotplug.c
diff options
context:
space:
mode:
Diffstat (limited to 'device-hotplug.c')
-rw-r--r--device-hotplug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/device-hotplug.c b/device-hotplug.c
index 6090d5f1e9..6153259d71 100644
--- a/device-hotplug.c
+++ b/device-hotplug.c
@@ -48,7 +48,7 @@ static DriveInfo *add_init_drive(const char *optstr)
mc = MACHINE_GET_CLASS(current_machine);
dinfo = drive_new(opts, mc->block_default_type, &err);
- if (!dinfo) {
+ if (err) {
error_report_err(err);
qemu_opts_del(opts);
return NULL;