All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bart.vanassche@sandisk.com>
To: James Bottomley <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Himanshu Madhani <himanshu.madhani@qlogic.com>,
	Quinn Tran <quinn.tran@qlogic.com>,
	Christoph Hellwig <hch@lst.de>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: [PATCH 1/3] qla2xxx: Indicate out-of-memory with -ENOMEM
Date: Wed, 30 Mar 2016 16:25:21 -0700	[thread overview]
Message-ID: <56FC6061.80403@sandisk.com> (raw)
In-Reply-To: <56FC6049.3090303@sandisk.com>

In the Linux kernel it is preferred to return a meaningful error code
instead of -1. This patch does not change the behavior of the caller of
qla82xx_pinit_from_rom().

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Quinn Tran <quinn.tran@qlogic.com>
Cc: Himanshu Madhani <himanshu.madhani@qlogic.com>
Cc: Christoph Hellwig <hch@lst.de>
---
 drivers/scsi/qla2xxx/qla_nx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
index b6b4cfd..54380b4 100644
--- a/drivers/scsi/qla2xxx/qla_nx.c
+++ b/drivers/scsi/qla2xxx/qla_nx.c
@@ -1229,7 +1229,7 @@ qla82xx_pinit_from_rom(scsi_qla_host_t *vha)
 	if (buf == NULL) {
 		ql_log(ql_log_fatal, vha, 0x010c,
 		    "Unable to allocate memory.\n");
-		return -1;
+		return -ENOMEM;
 	}
 
 	for (i = 0; i < n; i++) {
-- 
2.7.3


  reply	other threads:[~2016-03-30 23:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-30 23:24 [PATCH 0/3] qla2xxx: Patches for kernel v4.7 Bart Van Assche
2016-03-30 23:25 ` Bart Van Assche [this message]
2016-03-31  7:30   ` [PATCH 1/3] qla2xxx: Indicate out-of-memory with -ENOMEM Johannes Thumshirn
2016-03-31 15:21     ` Quinn Tran
2016-04-01  0:37   ` Martin K. Petersen
2016-03-30 23:25 ` [PATCH 2/3] qla2xxx: Remove set-but-not-used variables Bart Van Assche
2016-03-31  7:37   ` Johannes Thumshirn
2016-03-31 15:24     ` Quinn Tran
2016-03-31 15:57       ` Bart Van Assche
2016-03-30 23:26 ` [PATCH 3/3] qla2xxx: Assign names to the flags in cmd_flags Bart Van Assche
2016-03-31  7:56   ` Johannes Thumshirn
2016-03-31 15:16   ` Quinn Tran
2016-03-31 15:22     ` Bart Van Assche
2016-03-31 15:26       ` Quinn Tran
2016-03-31 15:52         ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56FC6061.80403@sandisk.com \
    --to=bart.vanassche@sandisk.com \
    --cc=hch@lst.de \
    --cc=himanshu.madhani@qlogic.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=quinn.tran@qlogic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.