* [PATCH] scsi: fnic: remove redundant NULL check
@ 2021-01-22 9:31 Yang Li
0 siblings, 0 replies; 3+ messages in thread
From: Yang Li @ 2021-01-22 9:31 UTC (permalink / raw)
To: jejb
Cc: martin.petersen, satishkh, sebaddel, kartilak, linux-scsi,
linux-kernel, Yang Li
Fix below warnings reported by coccicheck:
./drivers/scsi/fnic/fnic_debugfs.c:91:2-7: WARNING: NULL check before
some freeing functions is not needed.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <abaci-bugfix@linux.alibaba.com>
---
drivers/scsi/fnic/fnic_debugfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/fnic/fnic_debugfs.c b/drivers/scsi/fnic/fnic_debugfs.c
index 6c04936..6dce1cd 100644
--- a/drivers/scsi/fnic/fnic_debugfs.c
+++ b/drivers/scsi/fnic/fnic_debugfs.c
@@ -87,8 +87,7 @@ void fnic_debugfs_terminate(void)
debugfs_remove(fnic_trace_debugfs_root);
fnic_trace_debugfs_root = NULL;
- if (fc_trc_flag)
- vfree(fc_trc_flag);
+ vfree(fc_trc_flag);
}
/*
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: fnic: remove redundant NULL check
2022-03-15 1:53 Haowen Bai
@ 2022-05-03 0:51 ` Martin K. Petersen
0 siblings, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-05-03 0:51 UTC (permalink / raw)
To: Haowen Bai, jejb; +Cc: Martin K . Petersen, linux-kernel, linux-scsi
On Tue, 15 Mar 2022 09:53:39 +0800, Haowen Bai wrote:
> Fix below warnings reported by coccicheck:
> drivers/scsi/fnic/fnic_debugfs.c:90:2-7: WARNING: NULL check before some freeing functions is not needed.
>
>
Applied to 5.19/scsi-queue, thanks!
[1/1] scsi: fnic: remove redundant NULL check
https://git.kernel.org/mkp/scsi/c/1dcd96c4d0b7
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] scsi: fnic: remove redundant NULL check
@ 2022-03-15 1:53 Haowen Bai
2022-05-03 0:51 ` Martin K. Petersen
0 siblings, 1 reply; 3+ messages in thread
From: Haowen Bai @ 2022-03-15 1:53 UTC (permalink / raw)
To: jejb, martin.petersen; +Cc: linux-scsi, linux-kernel, Haowen Bai
Fix below warnings reported by coccicheck:
drivers/scsi/fnic/fnic_debugfs.c:90:2-7: WARNING: NULL check before some freeing functions is not needed.
Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
drivers/scsi/fnic/fnic_debugfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/fnic/fnic_debugfs.c b/drivers/scsi/fnic/fnic_debugfs.c
index e732650..866b4c9 100644
--- a/drivers/scsi/fnic/fnic_debugfs.c
+++ b/drivers/scsi/fnic/fnic_debugfs.c
@@ -86,8 +86,7 @@ void fnic_debugfs_terminate(void)
debugfs_remove(fnic_trace_debugfs_root);
fnic_trace_debugfs_root = NULL;
- if (fc_trc_flag)
- vfree(fc_trc_flag);
+ vfree(fc_trc_flag);
}
/*
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-05 2:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22 9:31 [PATCH] scsi: fnic: remove redundant NULL check Yang Li
2022-03-15 1:53 Haowen Bai
2022-05-03 0:51 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).