scsi: qla2xxx: Remove unnecessary null check
authorYueHaibing <yuehaibing@huawei.com>
Thu, 11 Jul 2019 14:13:17 +0000 (22:13 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 30 Jul 2019 16:07:34 +0000 (12:07 -0400)
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>
drivers/scsi/qla2xxx/qla_os.c

index 2e58cff..3c59157 100644 (file)
@@ -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);