summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2016-03-31 01:25:21 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2016-04-11 22:57:09 +0200
commit5cfe8d5b4c6f359a23738bbdc54a6007c6d6bdb1 (patch)
treeda57947104a99bed60051252fde92907852c6bf0 /drivers/scsi/qla2xxx
parentscsi_transport_fc: Unexport scsi_is_fc_vport() (diff)
downloadlinux-5cfe8d5b4c6f359a23738bbdc54a6007c6d6bdb1.tar.xz
linux-5cfe8d5b4c6f359a23738bbdc54a6007c6d6bdb1.zip
qla2xxx: Indicate out-of-memory with -ENOMEM
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> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Acked-by: Quinn Tran <quinn.tran@qlogic.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_nx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
index b6b4cfdd7620..54380b434b30 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++) {