Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1663061

[PATCH 1/2] scsi: qedi: Fix a return value in case of error in 'qedi_alloc_global_queues'

From Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Newsgroups linux.kernel
Subject [PATCH 1/2] scsi: qedi: Fix a return value in case of error in 'qedi_alloc_global_queues'
Date 2017-06-11 08:50 +0200
Message-ID <tR4Rb-1I0-7@gated-at.bofh.it> (permalink)
References <tR4Rb-1I0-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Fixes: ace7f46ba5fde ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/scsi/qedi/qedi_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c
index f46880315ba8..c81e494a9067 100644
--- a/drivers/scsi/qedi/qedi_main.c
+++ b/drivers/scsi/qedi/qedi_main.c
@@ -1319,6 +1319,7 @@ static int qedi_alloc_global_queues(struct qedi_ctx *qedi)
 		if (!qedi->global_queues[i]) {
 			QEDI_ERR(&qedi->dbg_ctx,
 				 "Unable to allocation global queue %d.\n", i);
+			status = -ENOMEM;
 			goto mem_alloc_failure;
 		}
 
-- 
2.11.0

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] scsi: qedi: Fix a return value in case of error in 'qedi_alloc_global_queues' Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2017-06-11 08:50 +0200
  Re: [PATCH 1/2] scsi: qedi: Fix a return value in case of error in  'qedi_alloc_global_queues' walter harms <wharms@bfs.de> - 2017-06-11 10:40 +0200

csiph-web