From: Bart Van Assche Date: Wed, 30 Mar 2016 23:25:21 +0000 (-0700) Subject: qla2xxx: Indicate out-of-memory with -ENOMEM X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5cfe8d5b4c6f359a23738bbdc54a6007c6d6bdb1;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Quinn Tran Cc: Himanshu Madhani Cc: Christoph Hellwig Reviewed-by: Johannes Thumshirn Acked-by: Quinn Tran Signed-off-by: Martin K. Petersen --- 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++) {