staging: pohmelfs: Remove NULL check before kfree
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 13 Mar 2011 05:29:03 +0000 (00:29 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 14 Mar 2011 18:57:33 +0000 (11:57 -0700)
This patch was generated by the following semantic patch:
// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);

@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/pohmelfs/config.c

index ed913306e5d63e21073435aa6d51a3db4872118f..a9a3e25a7efaeab38ae884fa5cab959c8316145d 100644 (file)
@@ -601,11 +601,9 @@ void pohmelfs_config_exit(void)
 
                list_del(&g->group_entry);
 
-               if (g->hash_string)
-                       kfree(g->hash_string);
+               kfree(g->hash_string);
 
-               if (g->cipher_string)
-                       kfree(g->cipher_string);
+               kfree(g->cipher_string);
 
                kfree(g);
        }