Commit 08cf8ab3 authored by Chengguang Xu's avatar Chengguang Xu Committed by Martin K. Petersen

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: default avatarChengguang Xu <cgxu519@gmx.com>
Acked-by: default avatarManish Rangankar <Manish.Rangankar@cavium.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent ed5b3994
......@@ -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)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment