From 43c04d42c3c5a23e2aff330d4d361c733118df80 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sun, 13 Mar 2011 00:29:02 -0500 Subject: [PATCH] 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 --- drivers/staging/line6/pcm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/line6/pcm.c b/drivers/staging/line6/pcm.c index b9c55f9..9d4c8a6 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; -- 2.7.4