lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <yq1ft8gvje1.fsf@ca-mkp.ca.oracle.com>
Date:   Thu, 20 Aug 2020 22:21:49 -0400
From:   "Martin K. Petersen" <martin.petersen@...cle.com>
To:     YueHaibing <yuehaibing@...wei.com>
Cc:     <hare@...e.de>, <jejb@...ux.ibm.com>, <martin.petersen@...cle.com>,
        <linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] scsi: libfc: Fix passing zero to 'PTR_ERR' warning


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()?

-- 
Martin K. Petersen	Oracle Linux Engineering

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ