Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Benes <mbenes@suse.cz>2019-03-07 15:28:57 +0100
committerMiroslav Benes <mbenes@suse.cz>2019-03-07 15:28:57 +0100
commit1bec539e0d78510ff2d1ba7077c528899490502d (patch)
tree238a74e169b3cdac7e8baa2777f76dabd104e4f5
parentcbbde026dde763b0bb237fa13855aa08e2901a51 (diff)
parent060163bd26b9dfff93989de95ba0fa4f29d9744c (diff)
Merge branch 'master-livepatch' into SLE15_Update_1
-rw-r--r--livepatch_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/livepatch_main.c b/livepatch_main.c
index a6262cb..990e5fe 100644
--- a/livepatch_main.c
+++ b/livepatch_main.c
@@ -48,14 +48,18 @@ static int __init klp_patch_init(void)
@@KLP_PATCHES_INIT_CALLS@@;
+#ifndef KLP_NOREG_API
retval = klp_register_patch(&patch);
if (retval)
goto err_patches_cleanup;
+#endif
retval = klp_enable_patch(&patch);
if (!retval)
return retval;
+#ifndef KLP_NOREG_API
WARN_ON(klp_unregister_patch(&patch));
+#endif
err_patches_cleanup:
@@KLP_PATCHES_INIT_ERR_HANDLERS@@;
@@ -68,7 +72,9 @@ static void __exit klp_patch_cleanup(void)
@@KLP_PATCHES_CLEANUP_CALLS@@;
+#ifndef KLP_NOREG_API
WARN_ON(klp_unregister_patch(&patch));
+#endif
}
module_init(klp_patch_init);