diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-09-13 09:02:59 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-09-13 09:02:59 -0700 |
commit | 20a7b6be0514334a30a4306331a4bcf6f78e451a (patch) | |
tree | bfba79534a972a07d7db020d9e993ab2415e6d3c /lib/kobject.c | |
parent | 2a1a4bee5ef277c7dc2906d9268db61478876288 (diff) | |
parent | baaabecfc80fad255f866563b53b8c7a3eec176e (diff) | |
download | linux-20a7b6be0514334a30a4306331a4bcf6f78e451a.tar.gz linux-20a7b6be0514334a30a4306331a4bcf6f78e451a.tar.bz2 linux-20a7b6be0514334a30a4306331a4bcf6f78e451a.zip |
Merge tag 'driver-core-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core fixes from Greg KH:
"Here are some small driver core and debugfs fixes for 5.9-rc5
Included in here are:
- firmware loader memory leak fix
- firmware loader testing fixes for non-EFI systems
- device link locking fixes found by lockdep
- kobject_del() bugfix that has been affecting some callers
- debugfs minor fix
All of these have been in linux-next for a while with no reported
issues"
* tag 'driver-core-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
test_firmware: Test platform fw loading on non-EFI systems
PM: <linux/device.h>: fix @em_pd kernel-doc warning
kobject: Drop unneeded conditional in __kobject_del()
driver core: Fix device_pm_lock() locking for device links
MAINTAINERS: Add the security document to SECURITY CONTACT
driver code: print symbolic error code
debugfs: Fix module state check condition
kobject: Restore old behaviour of kobject_del(NULL)
firmware_loader: fix memory leak for paged buffer
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); } |