]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
scsi: qedf: Fix a return value in case of error in 'qedf_alloc_global_queues'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 11 Jun 2017 06:16:02 +0000 (08:16 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 Jun 2017 01:20:40 +0000 (21:20 -0400)
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>
drivers/scsi/qedf/qedf_main.c

index 5842676e3b71ce30cdbbc0065630109bc5a2722a..f97dd0f9854369150eb0bd585b4031e6dad50c10 100644 (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;
                }