public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] batman-adv: remove useless NULL check
@ 2012-11-29  0:03 Antonio Quartulli
  2012-12-01 13:19 ` Marek Lindner
  0 siblings, 1 reply; 2+ messages in thread
From: Antonio Quartulli @ 2012-11-29  0:03 UTC (permalink / raw)
  To: b.a.t.m.a.n

debugfs_remove_recursive() checks whether its argument is not null
on its own, therefore it is possible to remove the external check.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
 debugfs.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/debugfs.c b/debugfs.c
index 6f58ddd..9df070c 100644
--- a/debugfs.c
+++ b/debugfs.c
@@ -397,10 +397,8 @@ err:
 
 void batadv_debugfs_destroy(void)
 {
-	if (batadv_debugfs) {
-		debugfs_remove_recursive(batadv_debugfs);
-		batadv_debugfs = NULL;
-	}
+	debugfs_remove_recursive(batadv_debugfs);
+	batadv_debugfs = NULL;
 }
 
 int batadv_debugfs_add_meshif(struct net_device *dev)
-- 
1.8.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: remove useless NULL check
  2012-11-29  0:03 [B.A.T.M.A.N.] [PATCH] batman-adv: remove useless NULL check Antonio Quartulli
@ 2012-12-01 13:19 ` Marek Lindner
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2012-12-01 13:19 UTC (permalink / raw)
  To: b.a.t.m.a.n

On Thursday, November 29, 2012 08:03:31 Antonio Quartulli wrote:
> debugfs_remove_recursive() checks whether its argument is not null
> on its own, therefore it is possible to remove the external check.
> 
> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
> ---
>  debugfs.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Applied in revision 25d7e06.

Thanks,
Marek

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-01 13:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-29  0:03 [B.A.T.M.A.N.] [PATCH] batman-adv: remove useless NULL check Antonio Quartulli
2012-12-01 13:19 ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox