scsi: qla4xxx: remvoe unnecessary condition check for mempool_destroy()

mempool_destroy() can handle NULL pointer correctly, so there is no
need to check NULL pointer before calling mempool_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:
Chengguang Xu 2018-11-04 21:57:50 +08:00 committed by Martin K. Petersen
parent 08cf8ab3c9
commit b03f3c3e52
1 changed files with 1 additions and 3 deletions

View File

@ -4160,9 +4160,7 @@ static void qla4xxx_mem_free(struct scsi_qla_host *ha)
ha->fw_dump_size = 0;
/* Free srb pool. */
if (ha->srb_mempool)
mempool_destroy(ha->srb_mempool);
mempool_destroy(ha->srb_mempool);
ha->srb_mempool = NULL;
dma_pool_destroy(ha->chap_dma_pool);