diff options
Diffstat (limited to 'samples/livepatch/livepatch-sample.c')
| -rw-r--r-- | samples/livepatch/livepatch-sample.c | 13 | 
1 files changed, 1 insertions, 12 deletions
diff --git a/samples/livepatch/livepatch-sample.c b/samples/livepatch/livepatch-sample.c index 2d554dd930e2..01c9cf003ca2 100644 --- a/samples/livepatch/livepatch-sample.c +++ b/samples/livepatch/livepatch-sample.c @@ -69,22 +69,11 @@ static struct klp_patch patch = {  static int livepatch_init(void)  { -	int ret; - -	ret = klp_register_patch(&patch); -	if (ret) -		return ret; -	ret = klp_enable_patch(&patch); -	if (ret) { -		WARN_ON(klp_unregister_patch(&patch)); -		return ret; -	} -	return 0; +	return klp_enable_patch(&patch);  }  static void livepatch_exit(void)  { -	WARN_ON(klp_unregister_patch(&patch));  }  module_init(livepatch_init);  | 
