提交 39dd3e5d 编写于 作者: I Ilia Mirkin 提交者: Greg Kroah-Hartman

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: NIlia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 ef055f10
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册