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>
This commit is contained in:
parent
ed5b3994c6
commit
08cf8ab3c9
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user