Re: [PATCH v2] scsi: libfc: Fix passing zero to 'PTR_ERR' warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020/8/21 10:21, Martin K. Petersen wrote:
> 
> YueHaibing,
> 
>> diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
>> index d8cbc9c0e766..574e842cefed 100644
>> --- a/drivers/scsi/libfc/fc_disc.c
>> +++ b/drivers/scsi/libfc/fc_disc.c
>> @@ -302,7 +302,7 @@ static void fc_disc_error(struct fc_disc *disc, struct fc_frame *fp)
>>  	unsigned long delay = 0;
>>  
>>  	FC_DISC_DBG(disc, "Error %ld, retries %d/%d\n",
>> -		    PTR_ERR(fp), disc->retry_count,
>> +		    IS_ERR(fp) ? PTR_ERR(fp) : 0, disc->retry_count,
>>  		    FC_DISC_RETRY_LIMIT);
>>  
>>  	if (!fp || PTR_ERR(fp) == -FC_EX_TIMEOUT) {
> 
> Why not PTR_ERR_OR_ZERO()?

Thanks, will respin.
> 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux