Skip to content

Commit b03f3c3

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

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/scsi/qla4xxx/ql4_os.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4160,9 +4160,7 @@ static void qla4xxx_mem_free(struct scsi_qla_host *ha)
41604160
ha->fw_dump_size = 0;
41614161

41624162
/* Free srb pool. */
4163-
if (ha->srb_mempool)
4164-
mempool_destroy(ha->srb_mempool);
4165-
4163+
mempool_destroy(ha->srb_mempool);
41664164
ha->srb_mempool = NULL;
41674165

41684166
dma_pool_destroy(ha->chap_dma_pool);

0 commit comments

Comments
 (0)