Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1337463 > unrolled thread
| Started by | Bhaktipriya Shridhar <bhaktipriya96@gmail.com> |
|---|---|
| First post | 2016-02-18 16:30 +0100 |
| Last post | 2016-02-21 00:40 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] staging: lusture: obdclass: Remove unnecessary NULL check Bhaktipriya Shridhar <bhaktipriya96@gmail.com> - 2016-02-18 16:30 +0100
Re: [PATCH] staging: lusture: obdclass: Remove unnecessary NULL check Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-21 00:40 +0100
| From | Bhaktipriya Shridhar <bhaktipriya96@gmail.com> |
|---|---|
| Date | 2016-02-18 16:30 +0100 |
| Subject | [PATCH] staging: lusture: obdclass: Remove unnecessary NULL check |
| Message-ID | <r3yGK-7yp-19@gated-at.bofh.it> |
NULL check before the debugfs_remove_recursive function is not needed.
This was detected using scripts/coccinelle/free/ifnullfree.cocci
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
---
drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
index 1913f3e..2045621 100644
--- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
+++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
@@ -454,8 +454,7 @@ out:
int class_procfs_clean(void)
{
- if (debugfs_lustre_root != NULL)
- debugfs_remove_recursive(debugfs_lustre_root);
+ debugfs_remove_recursive(debugfs_lustre_root);
debugfs_lustre_root = NULL;
--
2.1.4
[toc] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-21 00:40 +0100 |
| Message-ID | <r4pi1-5bF-1@gated-at.bofh.it> |
| In reply to | #1337463 |
On Thu, Feb 18, 2016 at 08:55:39PM +0530, Bhaktipriya Shridhar wrote: > NULL check before the debugfs_remove_recursive function is not needed. > > This was detected using scripts/coccinelle/free/ifnullfree.cocci > > Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> > --- > drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Doesn't apply to my tree :(
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web