Commit 8d02c022 authored by Tapasweni Pathak's avatar Tapasweni Pathak Committed by Greg Kroah-Hartman

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: default avatarTapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 029bf138
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment