diff options
author | 2020-11-07 13:18:49 +0100 | |
---|---|---|
committer | 2020-11-07 13:18:49 +0100 | |
commit | 0a986ea81e1aa8ac17e82cda53cc95158217956e (patch) | |
tree | a054b0ef413b7f327c04137c5768b2da6488511d /lib/kobject.c | |
parent | kprobes: Replace rp->free_instance with freelist (diff) | |
parent | kprobes: Init kprobes in early_initcall (diff) | |
download | wireguard-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.c | 9 |
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); } |