-----Original Message----- From: Johannes Thumshirn <jthumshirn@xxxxxxx> Date: Thursday, March 31, 2016 at 12:30 AM To: Bart Van Assche <bart.vanassche@xxxxxxxxxxx> Cc: James Bottomley <jejb@xxxxxxxxxxxxxxxxxx>, "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>, Himanshu Madhani <himanshu.madhani@xxxxxxxxxx>, Quinn Tran <quinn.tran@xxxxxxxxxx>, Christoph Hellwig <hch@xxxxxx>, linux-scsi <linux-scsi@xxxxxxxxxxxxxxx>, "linux-scsi-owner@xxxxxxxxxxxxxxx" <linux-scsi-owner@xxxxxxxxxxxxxxx> Subject: Re: [PATCH 1/3] qla2xxx: Indicate out-of-memory with -ENOMEM >On 2016-03-31 01:25, Bart Van Assche wrote: >> 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@xxxxxxxxxxx> >> Cc: Quinn Tran <quinn.tran@xxxxxxxxxx> >> Cc: Himanshu Madhani <himanshu.madhani@xxxxxxxxxx> >> Cc: Christoph Hellwig <hch@xxxxxx> >> --- >> 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++) { > >Looks good, >Reviewed-by: Johannes Thumshirn <jthumshirn@xxxxxxx> ACK. > ��.n��������+%������w��{.n�����{������ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f