Skip to content

Commit 66c6eee

Browse files
committed
[DM/NVME] Fixup the QUEUE alloc errorno check
Signed-off-by: GuEe-GUI <[email protected]>
1 parent 5abce84 commit 66c6eee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/drivers/nvme/nvme.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -970,9 +970,9 @@ static rt_err_t nvme_setup_io_queues(struct rt_nvme_controller *nvme)
970970
{
971971
queue = nvme_alloc_queue(nvme, q_idx, nvme->queue_depth);
972972

973-
if (!queue)
973+
if (rt_is_err(queue))
974974
{
975-
return -RT_ENOMEM;
975+
return rt_ptr_err(queue);
976976
}
977977

978978
if ((err = nvme_attach_queue_cq(queue)) ||

0 commit comments

Comments
 (0)