mirror of https://gitee.com/openkylin/linux.git
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:
parent
08cf8ab3c9
commit
b03f3c3e52
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue