From 39dd3e5d7b09b5a5010ed1aef512f2d58b65cb99 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sun, 13 Mar 2011 00:29:10 -0500 Subject: staging: speakup: 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/speakup/main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/staging/speakup/main.c') diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index cd981a13c12..42fcf7e9cb6 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -1305,10 +1305,8 @@ void speakup_deallocate(struct vc_data *vc) int vc_num; vc_num = vc->vc_num; - if (speakup_console[vc_num] != NULL) { - kfree(speakup_console[vc_num]); - speakup_console[vc_num] = NULL; - } + kfree(speakup_console[vc_num]); + speakup_console[vc_num] = NULL; } static u_char is_cursor; -- cgit v1.2.3