aboutsummaryrefslogtreecommitdiff
path: root/hw/ide/qdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ide/qdev.c')
-rw-r--r--hw/ide/qdev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index 5e549d9d2f..6231d7716c 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -110,6 +110,9 @@ static int ide_drive_initfn(IDEDevice *dev)
ide_init_drive(s, dev->conf.dinfo, dev->version, serial);
+ if (!dev->version) {
+ dev->version = qemu_strdup(s->version);
+ }
if (!dev->serial) {
dev->serial = qemu_strdup(s->drive_serial_str);
}