-----Original Message-----
From: Johannes Thumshirn <[email protected]>
Date: Thursday, March 31, 2016 at 12:30 AM
To: Bart Van Assche <[email protected]>
Cc: James Bottomley <[email protected]>, "Martin K. Petersen"
<[email protected]>, Himanshu Madhani <[email protected]>,
Quinn Tran <[email protected]>, Christoph Hellwig <[email protected]>, linux-scsi
<[email protected]>, "[email protected]"
<[email protected]>
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 <[email protected]>
>> Cc: Quinn Tran <[email protected]>
>> Cc: Himanshu Madhani <[email protected]>
>> Cc: Christoph Hellwig <[email protected]>
>> ---
>> 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 <[email protected]>
ACK.
>