summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla4xxx/ql4_os.c
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@gmx.com>2018-11-04 16:57:49 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2018-11-07 05:19:37 +0300
commit08cf8ab3c9e6f392f8d051fa0b574bc173d96a5d (patch)
treea9ca4250cf272bee174491615c1b14cfc70772c7 /drivers/scsi/qla4xxx/ql4_os.c
parented5b3994c6356179a605fb3d9e3519c3683d57f1 (diff)
downloadlinux-08cf8ab3c9e6f392f8d051fa0b574bc173d96a5d.tar.xz
scsi: qla4xxx: remove unnecessary condition check for dma_pool_destroy()
dma_pool_destroy() can handle NULL pointer correctly, so there is no need to check NULL pointer before calling dma_pool_destroy(). Signed-off-by: Chengguang Xu <cgxu519@gmx.com> Acked-by: Manish Rangankar <Manish.Rangankar@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_os.c')
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 051164f755a4..039950ab1cbc 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -4165,15 +4165,13 @@ static void qla4xxx_mem_free(struct scsi_qla_host *ha)
ha->srb_mempool = NULL;
- if (ha->chap_dma_pool)
- dma_pool_destroy(ha->chap_dma_pool);
+ dma_pool_destroy(ha->chap_dma_pool);
if (ha->chap_list)
vfree(ha->chap_list);
ha->chap_list = NULL;
- if (ha->fw_ddb_dma_pool)
- dma_pool_destroy(ha->fw_ddb_dma_pool);
+ dma_pool_destroy(ha->fw_ddb_dma_pool);
/* release io space registers */
if (is_qla8022(ha)) {