From: Christophe JAILLET Date: Sun, 11 Jun 2017 06:16:02 +0000 (+0200) Subject: scsi: qedf: Fix a return value in case of error in 'qedf_alloc_global_queues' X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3a240b21b5ccb77fcbece7a617f333cd31097776;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Chad Dupuis Signed-off-by: Martin K. Petersen --- 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; }