OSDN Git Service

livepatch: Remove duplicated code for early initialization
authorPetr Mladek <pmladek@suse.com>
Fri, 3 May 2019 13:26:25 +0000 (15:26 +0200)
committerJiri Kosina <jkosina@suse.cz>
Fri, 3 May 2019 19:11:23 +0000 (21:11 +0200)
commitf68d67cf2f83dc82675969724b59ca7c6da43fa9
tree6e31bc1427031d1cf8321f4fa0aece2aa7feb4c7
parent4d141ab3416d90f87775f5dee725efdf40110a8f
livepatch: Remove duplicated code for early initialization

kobject_init() call added one more operation that has to be
done when doing the early initialization of both static and
dynamic livepatch structures.

It would have been easier when the early initialization code
was not duplicated. Let's deduplicate it for future generations
of livepatching hackers.

The patch does not change the existing behavior.

Signed-off-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Acked-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
kernel/livepatch/core.c