projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bff8b14
)
scsi: libfc: Fix passing zero to 'PTR_ERR' warning
author
YueHaibing
<yuehaibing@huawei.com>
Wed, 9 Sep 2020 13:54:32 +0000
(21:54 +0800)
committer
Martin K. Petersen
<martin.petersen@oracle.com>
Tue, 15 Sep 2020 21:51:39 +0000
(17:51 -0400)
drivers/scsi/libfc/fc_disc.c:304
fc_disc_error() warn: passing zero to 'PTR_ERR'
fp may be NULL in fc_disc_error(), use PTR_ERR_OR_ZERO to handle this.
Link:
https://lore.kernel.org/r/20200909135432.36772-1-yuehaibing@huawei.com
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libfc/fc_disc.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/libfc/fc_disc.c
b/drivers/scsi/libfc/fc_disc.c
index e67abb184a8a0fb23a2fae0b7f58d43664e9841a..942fc60f7c21c770de1c60637f78987c958c6213 100644
(file)
--- a/
drivers/scsi/libfc/fc_disc.c
+++ b/
drivers/scsi/libfc/fc_disc.c
@@
-301,8
+301,8
@@
static void fc_disc_error(struct fc_disc *disc, struct fc_frame *fp)
struct fc_lport *lport = fc_disc_lport(disc);
unsigned long delay = 0;
- FC_DISC_DBG(disc, "Error %
l
d, retries %d/%d\n",
- PTR_ERR(fp), disc->retry_count,
+ FC_DISC_DBG(disc, "Error %d, retries %d/%d\n",
+ PTR_ERR
_OR_ZERO
(fp), disc->retry_count,
FC_DISC_RETRY_LIMIT);
if (!fp || PTR_ERR(fp) == -FC_EX_TIMEOUT) {