From: Ilia Mirkin Date: Sun, 13 Mar 2011 05:29:10 +0000 (-0500) Subject: staging: speakup: Remove NULL check before kfree X-Git-Tag: v2.6.39-rc1~469^2~80 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39dd3e5d7b09b5a5010ed1aef512f2d58b65cb99;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git 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 --- diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index cd981a1..42fcf7e 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;