diff options
author | Jason Yan <yanaijie@huawei.com> | 2020-04-18 12:58:50 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2020-04-25 01:21:15 +0300 |
commit | baf3fbf26cc003eaf7612ea215d6cc191bd6f850 (patch) | |
tree | a1f1afa71e6f3767849c0a44125da5865aa0c374 /drivers/scsi/mpt3sas | |
parent | 2e9ef0fcac01a871ab1afcaab9398beeb4d76ea9 (diff) | |
download | linux-baf3fbf26cc003eaf7612ea215d6cc191bd6f850.tar.xz |
scsi: mpt3sas: Remove NULL check before freeing function
Fix the following coccicheck warning:
drivers/scsi/mpt3sas/mpt3sas_base.c:4906:3-19: WARNING: NULL check
before some freeing functions is not needed.
Link: https://lore.kernel.org/r/20200418095850.34883-1-yanaijie@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mpt3sas')
-rw-r--r-- | drivers/scsi/mpt3sas/mpt3sas_base.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index e9471e501ea7..7416242624f0 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -4887,8 +4887,7 @@ _base_release_memory_pools(struct MPT3SAS_ADAPTER *ioc) ioc->pcie_sg_lookup[i].pcie_sgl, ioc->pcie_sg_lookup[i].pcie_sgl_dma); } - if (ioc->pcie_sgl_dma_pool) - dma_pool_destroy(ioc->pcie_sgl_dma_pool); + dma_pool_destroy(ioc->pcie_sgl_dma_pool); } if (ioc->config_page) { |