aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/kobject.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2020-11-07 13:18:49 +0100
committerIngo Molnar <mingo@kernel.org>2020-11-07 13:18:49 +0100
commit0a986ea81e1aa8ac17e82cda53cc95158217956e (patch)
treea054b0ef413b7f327c04137c5768b2da6488511d /lib/kobject.c
parentkprobes: Replace rp->free_instance with freelist (diff)
parentkprobes: Init kprobes in early_initcall (diff)
downloadwireguard-linux-0a986ea81e1aa8ac17e82cda53cc95158217956e.tar.xz
wireguard-linux-0a986ea81e1aa8ac17e82cda53cc95158217956e.zip
Merge branch 'linus' into perf/kprobes
Merge recent kprobes updates into perf/kprobes that came from -mm. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib/kobject.c')
-rw-r--r--lib/kobject.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/kobject.c b/lib/kobject.c
index 3afb939f2a1c..ea53b30cf483 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -604,9 +604,6 @@ static void __kobject_del(struct kobject *kobj)
struct kernfs_node *sd;
const struct kobj_type *ktype;
- if (!kobj)
- return;
-
sd = kobj->sd;
ktype = get_ktype(kobj);
@@ -637,8 +634,12 @@ static void __kobject_del(struct kobject *kobj)
*/
void kobject_del(struct kobject *kobj)
{
- struct kobject *parent = kobj->parent;
+ struct kobject *parent;
+
+ if (!kobj)
+ return;
+ parent = kobj->parent;
__kobject_del(kobj);
kobject_put(parent);
}