summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2011-03-13 00:29:10 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-14 11:57:36 -0700
commit39dd3e5d7b09b5a5010ed1aef512f2d58b65cb99 (patch)
tree82e552323d5d1e38be631a69c51ca3d62bc1d633 /drivers
parentef055f10000c5013d269cac9fc92c200bf314e40 (diff)
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')
-rw-r--r--drivers/staging/speakup/main.c6
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;