Blob Blame History Raw
From: YueHaibing <yuehaibing@huawei.com>
Date: Thu, 11 Jul 2019 22:13:17 +0800
Subject: scsi: qla2xxx: Remove unnecessary null check
Patch-mainline: v5.4-rc1
Git-commit: 0b3b6fe299c471e44ed8713b7a602882626e693f
References: bsc#1082635 bsc#1141340 bsc#1143706

A null check before dma_pool_destroy is redundant, so remove it. This is
detected by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Daniel Wagner <dwagner@suse.de>
---
 drivers/scsi/qla2xxx/qla_os.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -4747,8 +4747,7 @@ qla2x00_mem_free(struct qla_hw_data *ha)
 		}
 	}
 
-	if (ha->dif_bundl_pool)
-		dma_pool_destroy(ha->dif_bundl_pool);
+	dma_pool_destroy(ha->dif_bundl_pool);
 	ha->dif_bundl_pool = NULL;
 
 	qlt_mem_free(ha);