Skip to content
Commit 4d141ab3 authored by Petr Mladek's avatar Petr Mladek Committed by Jiri Kosina
Browse files

livepatch: Remove custom kobject state handling



kobject_init() always succeeds and sets the reference count to 1.
It allows to always free the structures via kobject_put() and
the related release callback.

Note that the custom kobject state handling was used only
because we did not know that kobject_put() can and actually
should get called even when kobject_init_and_add() fails.

The patch should not change the existing behavior.

Suggested-by: default avatar"Tobin C. Harding" <tobin@kernel.org>
Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
Reviewed-by: default avatarKamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Acked-by: default avatarJoe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 31adf230
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment