Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751874AbdFKGQV (ORCPT ); Sun, 11 Jun 2017 02:16:21 -0400 Received: from smtp11.smtpout.orange.fr ([80.12.242.133]:34388 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751772AbdFKGQS (ORCPT ); Sun, 11 Jun 2017 02:16:18 -0400 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 11 Jun 2017 08:16:17 +0200 X-ME-IP: 92.140.237.203 From: Christophe JAILLET To: QLogic-Storage-Upstream@cavium.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH 1/3] scsi: qedf: Fix a return value in case of error in 'qedf_alloc_global_queues' Date: Sun, 11 Jun 2017 08:16:02 +0200 Message-Id: <7674c3a305022d1e30b7e7b744b673713fd50117.1497160148.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 786 Lines: 23 We should return -ENOMEM in case of memory allocation error, as done elsewhere in this function. Fixes: 61d8658b4a435 ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.") Signed-off-by: Christophe JAILLET --- drivers/scsi/qedf/qedf_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index aab3e2bd26a0..52a27100ca6d 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -2673,6 +2673,7 @@ static int qedf_alloc_global_queues(struct qedf_ctx *qedf) if (!qedf->global_queues[i]) { QEDF_WARN(&(qedf->dbg_ctx), "Unable to allocation " "global queue %d.\n", i); + status = -ENOMEM; goto mem_alloc_failure; } -- 2.11.0