mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-02-06 17:12:01 +08:00
[DM/NVME] Fixup the QUEUE alloc errorno check
Signed-off-by: GuEe-GUI <2991707448@qq.com>
This commit is contained in:
@@ -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)) ||
|
||||
|
||||
Reference in New Issue
Block a user