提交 f6995383 编写于 作者: J Jia-Ju Bai 提交者: Martin K. Petersen

scsi: qedi: Fix error return code of qedi_alloc_global_queues()

When kzalloc() returns NULL to qedi->global_queues[i], no error return code
of qedi_alloc_global_queues() is assigned.  To fix this bug, status is
assigned with -ENOMEM in this case.

Link: https://lore.kernel.org/r/20210308033024.27147-1-baijiaju1990@gmail.com
Fixes: ace7f46b ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.")
Reported-by: NTOTE Robot <oslab@tsinghua.edu.cn>
Acked-by: NManish Rangankar <mrangankar@marvell.com>
Signed-off-by: NJia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 39c0c855
......@@ -1675,6 +1675,7 @@ static int qedi_alloc_global_queues(struct qedi_ctx *qedi)
if (!qedi->global_queues[i]) {
QEDI_ERR(&qedi->dbg_ctx,
"Unable to allocation global queue %d.\n", i);
status = -ENOMEM;
goto mem_alloc_failure;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册