diff options
Diffstat (limited to 'kernel/module.c')
-rw-r--r-- | kernel/module.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c index 8c25b1a04fa6..1ecf08106381 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -2425,6 +2425,12 @@ void module_remove_driver(struct device_driver *drv) | |||
2425 | kfree(driver_name); | 2425 | kfree(driver_name); |
2426 | } | 2426 | } |
2427 | } | 2427 | } |
2428 | /* | ||
2429 | * Undo the additional reference we added in module_add_driver() | ||
2430 | * via kset_find_obj() | ||
2431 | */ | ||
2432 | if (drv->mod_name) | ||
2433 | kobject_put(&drv->kobj); | ||
2428 | } | 2434 | } |
2429 | EXPORT_SYMBOL(module_remove_driver); | 2435 | EXPORT_SYMBOL(module_remove_driver); |
2430 | #endif | 2436 | #endif |