summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorGuEe-GUI <[email protected]>2025-09-05 13:43:57 +0800
committerR b b666 <[email protected]>2025-09-07 07:54:01 +0800
commit09d4d5f6fe09d5f7e80d704097e7ff853ce64844 (patch)
tree7f0aee3fea0253fef60c82e639d03a67ded85442 /components
parent8cca8d6a39db167c708e18943d156e3c7b6c6850 (diff)
[DM/NVME] Fixup the QUEUE alloc errorno check
Signed-off-by: GuEe-GUI <[email protected]>
Diffstat (limited to 'components')
-rw-r--r--components/drivers/nvme/nvme.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/drivers/nvme/nvme.c b/components/drivers/nvme/nvme.c
index b3dc0c5c92..8a7c2235d9 100644
--- a/components/drivers/nvme/nvme.c
+++ b/components/drivers/nvme/nvme.c
@@ -970,9 +970,9 @@ static rt_err_t nvme_setup_io_queues(struct rt_nvme_controller *nvme)
{
queue = nvme_alloc_queue(nvme, q_idx, nvme->queue_depth);
- if (!queue)
+ if (rt_is_err(queue))
{
- return -RT_ENOMEM;
+ return rt_ptr_err(queue);
}
if ((err = nvme_attach_queue_cq(queue)) ||