mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
scsi: qedi: Fix error return code of qedi_alloc_global_queues()
[ Upstream commitf69953837c] 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:ace7f46ba5("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.") Reported-by: TOTE Robot <oslab@tsinghua.edu.cn> Acked-by: Manish Rangankar <mrangankar@marvell.com> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
063c3cfb26
commit
d317477057
@@ -1605,6 +1605,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user