Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: line6: Remove NULL check before kfree

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>

authored by

Ilia Mirkin and committed by
Greg Kroah-Hartman
43c04d42 306be9e1

+1 -2
+1 -2
drivers/staging/line6/pcm.c
··· 189 189 line6pcm->buffer_out = NULL; 190 190 } 191 191 #if LINE6_BACKUP_MONITOR_SIGNAL 192 - if (line6pcm->prev_fbuf != NULL) 193 - kfree(line6pcm->prev_fbuf); 192 + kfree(line6pcm->prev_fbuf); 194 193 #endif 195 194 196 195 return 0;