From: Chengguang Xu Date: Mon, 27 Aug 2018 23:50:08 +0000 (+0800) Subject: scsi: libfc: remove unnecessary condition check X-Git-Tag: Ubuntu-5.2.0-15.16~3324^2~231 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=b6876a8407d042de369105e8c86299c83a4fdab1;p=mirror_ubuntu-eoan-kernel.git 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 Acked-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen --- 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); } /**