summaryrefslogtreecommitdiffstats
path: root/hw/ide
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ide')
-rw-r--r--hw/ide/qdev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index caa88526f5..3ccb5e2529 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -187,7 +187,10 @@ static void ide_dev_initfn(IDEDevice *dev, IDEDriveKind kind, Error **errp)
return;
}
- blkconf_blocksizes(&dev->conf);
+ if (!blkconf_blocksizes(&dev->conf, errp)) {
+ return;
+ }
+
if (dev->conf.logical_block_size != 512) {
error_setg(errp, "logical_block_size must be 512 for IDE");
return;