summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc/fc_fcp.c
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@gmx.com>2018-08-28 01:50:08 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2018-08-30 13:36:48 +0200
commitb6876a8407d042de369105e8c86299c83a4fdab1 (patch)
tree8445bf7971b69d44027106b092fcad6592164093 /drivers/scsi/libfc/fc_fcp.c
parentscsi: lpfc: remove an unnecessary NULL check (diff)
downloadlinux-b6876a8407d042de369105e8c86299c83a4fdab1.tar.xz
linux-b6876a8407d042de369105e8c86299c83a4fdab1.zip
scsi: libfc: remove unnecessary condition check
kmem_cache_destroy() can handle NULL pointer correctly, so there is no need to check NULL pointer before calling kmem_cache_destroy() Signed-off-by: Chengguang Xu <cgxu519@gmx.com> Acked-by: Johannes Thumshirn <jth@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/libfc/fc_fcp.c')
-rw-r--r--drivers/scsi/libfc/fc_fcp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index 4fae253d4f3d..563247def49a 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -2295,8 +2295,7 @@ int fc_setup_fcp(void)
void fc_destroy_fcp(void)
{
- if (scsi_pkt_cachep)
- kmem_cache_destroy(scsi_pkt_cachep);
+ kmem_cache_destroy(scsi_pkt_cachep);
}
/**