summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla4xxx
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@gmx.com>2018-11-04 21:57:50 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2018-11-06 21:20:18 -0500
commitb03f3c3e527a7da50f12ddb2021cb28ed99e46f7 (patch)
treecb3d9472aeb551dbb766f3a11c4624209137ef6a /drivers/scsi/qla4xxx
parent08cf8ab3c9e6f392f8d051fa0b574bc173d96a5d (diff)
downloadlwn-b03f3c3e527a7da50f12ddb2021cb28ed99e46f7.tar.gz
lwn-b03f3c3e527a7da50f12ddb2021cb28ed99e46f7.zip
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>
Diffstat (limited to 'drivers/scsi/qla4xxx')
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 039950ab1cbc..1c702cd22359 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -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);