Skip to content

Commit 08cf8ab

Browse files
Chengguang Xumartinkpetersen
authored andcommitted
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>
1 parent ed5b399 commit 08cf8ab

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/scsi/qla4xxx/ql4_os.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4165,15 +4165,13 @@ static void qla4xxx_mem_free(struct scsi_qla_host *ha)
41654165

41664166
ha->srb_mempool = NULL;
41674167

4168-
if (ha->chap_dma_pool)
4169-
dma_pool_destroy(ha->chap_dma_pool);
4168+
dma_pool_destroy(ha->chap_dma_pool);
41704169

41714170
if (ha->chap_list)
41724171
vfree(ha->chap_list);
41734172
ha->chap_list = NULL;
41744173

4175-
if (ha->fw_ddb_dma_pool)
4176-
dma_pool_destroy(ha->fw_ddb_dma_pool);
4174+
dma_pool_destroy(ha->fw_ddb_dma_pool);
41774175

41784176
/* release io space registers */
41794177
if (is_qla8022(ha)) {

0 commit comments

Comments
 (0)