From: Ilia Mirkin Date: Sun, 13 Mar 2011 05:29:02 +0000 (-0500) Subject: staging: line6: Remove NULL check before kfree X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=43c04d42c3c5a23e2aff330d4d361c733118df80;p=linux-beck.git staging: line6: Remove NULL check before kfree This patch was generated by the following semantic patch: // @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // Signed-off-by: Ilia Mirkin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/line6/pcm.c b/drivers/staging/line6/pcm.c index b9c55f9eb501..9d4c8a606eea 100644 --- a/drivers/staging/line6/pcm.c +++ b/drivers/staging/line6/pcm.c @@ -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;