diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2011-03-13 08:29:10 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-14 21:57:36 +0300 |
commit | 39dd3e5d7b09b5a5010ed1aef512f2d58b65cb99 (patch) | |
tree | 82e552323d5d1e38be631a69c51ca3d62bc1d633 /drivers/staging/speakup | |
parent | ef055f10000c5013d269cac9fc92c200bf314e40 (diff) | |
download | linux-39dd3e5d7b09b5a5010ed1aef512f2d58b65cb99.tar.xz |
staging: speakup: 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>
Diffstat (limited to 'drivers/staging/speakup')
-rw-r--r-- | drivers/staging/speakup/main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index cd981a13c12d..42fcf7e9cb64 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; |