diff mbox series

[v2,-next] scsi: qla2xxx: Remove unnecessary null check

Message ID 20190711141317.52192-1-yuehaibing@huawei.com (mailing list archive)
State Mainlined
Commit 0b3b6fe299c471e44ed8713b7a602882626e693f
Headers show
Series [v2,-next] scsi: qla2xxx: Remove unnecessary null check | expand

Commit Message

Yue Haibing July 11, 2019, 2:13 p.m. UTC
A null check before dma_pool_destroy is redundant,
so remove it. This is detected by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
v2: fix commit log
---
 drivers/scsi/qla2xxx/qla_os.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Martin K. Petersen July 30, 2019, 4:08 p.m. UTC | #1
YueHaibing,

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

Applied to 5.4/scsi-queue. Thanks!
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 2e58cff..3c59157 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -4731,8 +4731,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);