]> git.proxmox.com Git - mirror_qemu.git/commit
hw/nvme: remove assert from nvme_get_zone_by_slba
authorKlaus Jensen <k.jensen@samsung.com>
Thu, 17 Jun 2021 19:06:51 +0000 (21:06 +0200)
committerKlaus Jensen <k.jensen@samsung.com>
Tue, 29 Jun 2021 05:16:25 +0000 (07:16 +0200)
commit189a8bf7f64aff9c2e26a6e6f2adc654eb9bbe81
tree48302f832b705b9dc0be7d84c057853490fdfd3c
parent0ca5c3ccac72ce58a11f97b74f304934df72e90a
hw/nvme: remove assert from nvme_get_zone_by_slba

Make nvme_get_zone_by_slba() return NULL if the slba is out of range.
This allows the function to be used without guarding the call with a
call to nvme_check_bounds(), in preparation for the next patch.

Add asserts after calling nvme_get_zone_by_slba() instead.

Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
hw/nvme/ctrl.c