diff options
| author | 2020-09-14 10:10:55 +0200 | |
|---|---|---|
| committer | 2020-09-14 10:10:55 +0200 | |
| commit | fccee0baced04636952cd580ddee4bb8cbb9544c (patch) | |
| tree | 80e25c0e100246357bd0c0a93feb1bf2e5e5bd1d /lib/kobject.c | |
| parent | usb: typec: intel_pmc_mux: Support for device role (UFP) (diff) | |
| parent | Linux 5.9-rc5 (diff) | |
| download | wireguard-linux-fccee0baced04636952cd580ddee4bb8cbb9544c.tar.xz wireguard-linux-fccee0baced04636952cd580ddee4bb8cbb9544c.zip | |
Merge 5.9-rc5 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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); } |
