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
commit4dfe09c2efd4c37b800c60fa9e5158bef41ecb66 (patch)
treee8b7a86c701582ca47294c08ec2cc33304a6b3d2
parent55b9caa1dcc9e774edee523abff7717170d772e9 (diff)
parent060163bd26b9dfff93989de95ba0fa4f29d9744c (diff)
Merge branch 'master-livepatch' into SLE15_Update_0
-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);