diff options
Diffstat (limited to 'hw/block/nvme-subsys.h')
-rw-r--r-- | hw/block/nvme-subsys.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/block/nvme-subsys.h b/hw/block/nvme-subsys.h index fb66ae752a..aafa04b848 100644 --- a/hw/block/nvme-subsys.h +++ b/hw/block/nvme-subsys.h @@ -54,6 +54,8 @@ static inline NvmeNamespace *nvme_subsys_ns(NvmeSubsystem *subsys, return NULL; } + assert(nsid && nsid <= NVME_SUBSYS_MAX_NAMESPACES); + return subsys->namespaces[nsid]; } |