提交 08cf8ab3 编写于 作者: C Chengguang Xu 提交者: 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: NChengguang Xu <cgxu519@gmx.com>
Acked-by: NManish Rangankar <Manish.Rangankar@cavium.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册