scsi: libfc: Fix passing zero to 'PTR_ERR' warning
authorYueHaibing <yuehaibing@huawei.com>
Wed, 9 Sep 2020 13:54:32 +0000 (21:54 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 15 Sep 2020 21:51:39 +0000 (17:51 -0400)
commita9e81c2922bfc4cfe04e33fcbc49ef21e367d7de
treec56ac29c646c295c6b4aa25899ac65c9089249df
parentbff8b14b097433c46f142ea8cd8deb910a66d8fc
scsi: libfc: Fix passing zero to 'PTR_ERR' warning

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