Skip to content

Commit

Permalink
lib/test_string.c: allow module removal
Browse files Browse the repository at this point in the history
The test_string module can't be removed because it lacks an exit hook.
Since there is no reason for it to be permanent, add an empty one to allow
module removal.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Matteo Croce <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
teknoraver authored and torvalds committed Jul 1, 2021
1 parent ad65dce commit ce71efd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/test_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ static __init int strnchr_selftest(void)
return 0;
}

static __exit void string_selftest_remove(void)
{
}

static __init int string_selftest_init(void)
{
int test, subtest;
Expand Down Expand Up @@ -216,4 +220,5 @@ static __init int string_selftest_init(void)
}

module_init(string_selftest_init);
module_exit(string_selftest_remove);
MODULE_LICENSE("GPL v2");

0 comments on commit ce71efd

Please sign in to comment.