* [PATCH] scsi: mpt3sas: remove NULL check before freeing function
@ 2020-04-18 9:58 Jason Yan
2020-04-27 20:21 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Jason Yan @ 2020-04-18 9:58 UTC (permalink / raw)
To: sathya.prakash, chaitra.basappa, suganath-prabu.subramani, jejb,
martin.petersen, sreekanth.reddy, MPT-FusionLinux.pdl,
linux-scsi, linux-kernel
Cc: Jason Yan, Hulk Robot
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 <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
drivers/scsi/mpt3sas/mpt3sas_base.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 663782bb790d..06285b03fa00 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -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) {
--
2.21.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scsi: mpt3sas: remove NULL check before freeing function
2020-04-18 9:58 [PATCH] scsi: mpt3sas: remove NULL check before freeing function Jason Yan
@ 2020-04-27 20:21 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2020-04-27 20:21 UTC (permalink / raw)
To: chaitra.basappa, linux-kernel, MPT-FusionLinux.pdl,
suganath-prabu.subramani, jejb, sreekanth.reddy, linux-scsi,
Jason Yan, sathya.prakash
Cc: Martin K . Petersen, Hulk Robot
On Sat, 18 Apr 2020 17:58:50 +0800, Jason Yan wrote:
> 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
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-27 20:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-18 9:58 [PATCH] scsi: mpt3sas: remove NULL check before freeing function Jason Yan
2020-04-27 20:21 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.