diff options
author | 2020-10-28 21:36:51 +0000 | |
---|---|---|
committer | 2020-10-28 21:36:51 +0000 | |
commit | 3bfd5f422f07a10f485c3f046431783c7c4004f2 (patch) | |
tree | 7e990a251c825482216a0355177ef80874b3c0cb /lib/kobject.c | |
parent | spi: imx: fix runtime pm support for !CONFIG_PM (diff) | |
parent | Linux 5.10-rc1 (diff) | |
download | wireguard-linux-3bfd5f422f07a10f485c3f046431783c7c4004f2.tar.xz wireguard-linux-3bfd5f422f07a10f485c3f046431783c7c4004f2.zip |
Merge tag 'v5.10-rc1' into spi-5.10
Linux 5.10-rc1
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); } |