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

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: 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 08cf8ab3
......@@ -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);
......
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