diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/block/nvme.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c index f206391e8e..0b77b49b36 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -1208,6 +1208,11 @@ static void nvme_realize(PCIDevice *pci_dev, Error **errp) int64_t bs_size; uint8_t *pci_conf; + if (!n->num_queues) { + error_setg(errp, "num_queues can't be zero"); + return; + } + if (!n->conf.blk) { error_setg(errp, "drive property not set"); return; |