scsi: qedf: Fix a return value in case of error in 'qedf_alloc_global_queues'

We should return -ENOMEM in case of memory allocation error, as done
elsewhere in this function.

[mkp: fixed typo]

Fixes: 61d8658b4a ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Chad Dupuis <chad.dupuis@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Christophe JAILLET 2017-06-11 08:16:02 +02:00 committed by Martin K. Petersen
parent 249cf320bd
commit 3a240b21b5

View file

@ -2671,8 +2671,9 @@ static int qedf_alloc_global_queues(struct qedf_ctx *qedf)
qedf->global_queues[i] = kzalloc(sizeof(struct global_queue),
GFP_KERNEL);
if (!qedf->global_queues[i]) {
QEDF_WARN(&(qedf->dbg_ctx), "Unable to allocation "
QEDF_WARN(&(qedf->dbg_ctx), "Unable to allocate "
"global queue %d.\n", i);
status = -ENOMEM;
goto mem_alloc_failure;
}