Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5cfe8d5b authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen
Browse files

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: default avatarBart 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: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Acked-by: default avatarQuinn Tran <quinn.tran@qlogic.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 62055172
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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++) {