summaryrefslogtreecommitdiff
path: root/kernel/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 07cb91d8f761..0798443ce002 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -576,6 +576,8 @@ sys_delete_module(const char __user *name_user, unsigned int flags)
/* Stop the machine so refcounts can't move and disable module. */
ret = try_stop_module(mod, flags, &forced);
+ if (ret != 0)
+ goto out;
/* Never wait if forced. */
if (!forced && module_refcount(mod) != 0)