mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 09:41:54 +09:00
staging: unisys: visorutil: 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: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
029bf13814
commit
8d02c02253
@@ -320,19 +320,18 @@ void visor_proc_DestroyObject(MYPROCOBJECT *obj)
|
||||
kfree(obj->procDirProperties);
|
||||
obj->procDirProperties = NULL;
|
||||
}
|
||||
if (obj->procDirPropertyContexts != NULL) {
|
||||
kfree(obj->procDirPropertyContexts);
|
||||
obj->procDirPropertyContexts = NULL;
|
||||
}
|
||||
|
||||
kfree(obj->procDirPropertyContexts);
|
||||
obj->procDirPropertyContexts = NULL;
|
||||
|
||||
if (obj->procDir != NULL) {
|
||||
if (obj->name != NULL)
|
||||
remove_proc_entry(obj->name, type->procDir);
|
||||
obj->procDir = NULL;
|
||||
}
|
||||
if (obj->name != NULL) {
|
||||
kfree(obj->name);
|
||||
obj->name = NULL;
|
||||
}
|
||||
|
||||
kfree(obj->name);
|
||||
obj->name = NULL;
|
||||
kfree(obj);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(visor_proc_DestroyObject);
|
||||
|
||||
Reference in New Issue
Block a user