提交 eafe89f5 编写于 作者: J James Smart 提交者: Christoph Hellwig

Remove NULL ptr check before kfree.

The check for NULL ptr is not necessary, kfree will check it.

Removing NULL ptr check.
Signed-off-by: NDick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: NJames Smart <james.smart@broadcom.com>
Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
上级 06909bb9
...@@ -5700,10 +5700,8 @@ lpfc_debugfs_terminate(struct lpfc_vport *vport) ...@@ -5700,10 +5700,8 @@ lpfc_debugfs_terminate(struct lpfc_vport *vport)
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS #ifdef CONFIG_SCSI_LPFC_DEBUG_FS
struct lpfc_hba *phba = vport->phba; struct lpfc_hba *phba = vport->phba;
if (vport->disc_trc) { kfree(vport->disc_trc);
kfree(vport->disc_trc); vport->disc_trc = NULL;
vport->disc_trc = NULL;
}
debugfs_remove(vport->debug_disc_trc); /* discovery_trace */ debugfs_remove(vport->debug_disc_trc); /* discovery_trace */
vport->debug_disc_trc = NULL; vport->debug_disc_trc = NULL;
...@@ -5770,10 +5768,8 @@ lpfc_debugfs_terminate(struct lpfc_vport *vport) ...@@ -5770,10 +5768,8 @@ lpfc_debugfs_terminate(struct lpfc_vport *vport)
debugfs_remove(phba->debug_readRef); /* readRef */ debugfs_remove(phba->debug_readRef); /* readRef */
phba->debug_readRef = NULL; phba->debug_readRef = NULL;
if (phba->slow_ring_trc) { kfree(phba->slow_ring_trc);
kfree(phba->slow_ring_trc); phba->slow_ring_trc = NULL;
phba->slow_ring_trc = NULL;
}
/* slow_ring_trace */ /* slow_ring_trace */
debugfs_remove(phba->debug_slow_ring_trc); debugfs_remove(phba->debug_slow_ring_trc);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册