Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Benes <mbenes@suse.cz>2019-03-07 15:25:41 +0100
committerMiroslav Benes <mbenes@suse.cz>2019-03-07 15:25:41 +0100
commit9e8341f61166de6936ab65e4a58d2abfe3d3c3e9 (patch)
treeb3899513f8df835e53409f8c17cfd9daa629e59d
parent7c613c395877b3ee09a9fbfaa7fba88c09f99805 (diff)
parent060163bd26b9dfff93989de95ba0fa4f29d9744c (diff)
Merge branch 'master-livepatch' into master-livepatch-sle12
-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);