staging: line6: Remove NULL check before kfree
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 13 Mar 2011 05:29:02 +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/line6/pcm.c

index b9c55f9eb501185bb63ad142ca2ea7f1f2bca950..9d4c8a606eea3f293bd3d8686d1cb256efa4c57f 100644 (file)
@@ -189,8 +189,7 @@ int line6_pcm_stop(struct snd_line6_pcm *line6pcm, int channels)
                line6pcm->buffer_out = NULL;
        }
 #if LINE6_BACKUP_MONITOR_SIGNAL
-       if (line6pcm->prev_fbuf != NULL)
-               kfree(line6pcm->prev_fbuf);
+       kfree(line6pcm->prev_fbuf);
 #endif
 
        return 0;
This page took 0.024729 seconds and 5 git commands to generate.