Skip to content

Commit

Permalink
tools/rmmod: return EXIT_FAILURE if kmod_module_new_* fails
Browse files Browse the repository at this point in the history
In the unlikely case where kmod_module_new_from_{path,name} fails,
rmmod will return success. Change that to EXIT_FAILURE.

Signed-off-by: Emil Velikov <[email protected]>
Link: #138
Signed-off-by: Lucas De Marchi <[email protected]>
  • Loading branch information
evelikov authored and lucasdemarchi committed Sep 21, 2024
1 parent a6f9cd0 commit 6317b4a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/rmmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ static int do_rmmod(int argc, char *argv[])
if (err < 0) {
ERR("could not use module %s: %s\n", arg,
strerror(-err));
r = EXIT_FAILURE;
break;
}

Expand Down

0 comments on commit 6317b4a

Please sign in to comment.