scsi: mpt3sas: remove NULL check before freeing function
Subsystems (2)
PATCH 1/1 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.
Reported-by Hulk Robot <[email protected]>
Signed-off-by Jason Yan <[email protected]>
--- drivers/scsi/mpt3sas/mpt3sas_base.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/mpt3sas/mpt3sas_base.c +1 -2
@@ -4902,8 +4902,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) {
Signature · 1 line
2.21.1
Martin K. Petersen
AppliedQuoted 4 lines · Jason Yan
Fix the following coccicheck warning:
drivers/scsi/mpt3sas/mpt3sas_base.c:4906:3-19: WARNING: NULL check before some freeing functions is not needed.
Applied to 5.8/scsi-queue, thanks!
[1/1] scsi: mpt3sas: Remove NULL check before freeing function
https://git.kernel.org/mkp/scsi/c/baf3fbf26cc0
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering