aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qedf/qedf_main.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2017-06-11 08:16:02 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2017-06-12 21:20:40 -0400
commit3a240b21b5ccb77fcbece7a617f333cd31097776 (patch)
treef29ba3e21cbe7b1508c22565e8b76fa30c3b0cea /drivers/scsi/qedf/qedf_main.c
parentscsi: esas2r: Replace semaphore fs_api_semaphore with mutex (diff)
downloadlinux-dev-3a240b21b5ccb77fcbece7a617f333cd31097776.tar.xz
linux-dev-3a240b21b5ccb77fcbece7a617f333cd31097776.zip
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: 61d8658b4a435 ("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>
Diffstat (limited to 'drivers/scsi/qedf/qedf_main.c')
-rw-r--r--drivers/scsi/qedf/qedf_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index 5842676e3b71..f97dd0f98543 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -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;
}