mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-23 08:35:19 -05:00
kobject: Drop unneeded conditional in __kobject_del()
__kobject_del() is called from two places, in one where kobj is dereferenced before and thus can't be NULL, and in the other the NULL check is done before call. Drop unneeded conditional in __kobject_del(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lore.kernel.org/r/20200803083520.5460-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6b57b15abe
commit
07ecc6693f
1 changed files with 0 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue