summaryrefslogtreecommitdiffstats
path: root/hw/block/swim.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/block/swim.c')
-rw-r--r--hw/block/swim.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/block/swim.c b/hw/block/swim.c
index 8f124782f4..74f56e8f46 100644
--- a/hw/block/swim.c
+++ b/hw/block/swim.c
@@ -189,7 +189,10 @@ static void swim_drive_realize(DeviceState *qdev, Error **errp)
assert(ret == 0);
}
- blkconf_blocksizes(&dev->conf);
+ if (!blkconf_blocksizes(&dev->conf, errp)) {
+ return;
+ }
+
if (dev->conf.logical_block_size != 512 ||
dev->conf.physical_block_size != 512)
{