]> git.baikalelectronics.ru Git - kernel.git/commit
kobject: Drop unneeded conditional in __kobject_del()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 3 Aug 2020 08:35:20 +0000 (11:35 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Sep 2020 09:24:17 +0000 (11:24 +0200)
commit8df9e33c108934e3c38ed60d39f2b4f352f505e3
tree7209b52a587f76c34c8a6be0dfcb5b32a0df67a6
parentafa84fbe9f572cebb2d36ab438d7cfc6d84c70f1
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>
lib/kobject.c