mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
serdev: fix memleak on module unload
Make sure to free all resources associated with the ida on module
exit.
Fixes: cd6484e183 ("serdev: Introduce new bus for serial attached devices")
Cc: stable <[email protected]> # 4.11
Signed-off-by: Johan Hovold <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
20dcff436e
commit
bc6cf3669d
1 changed files with 1 additions and 0 deletions
|
|
@ -617,6 +617,7 @@ EXPORT_SYMBOL_GPL(__serdev_device_driver_register);
|
|||
static void __exit serdev_exit(void)
|
||||
{
|
||||
bus_unregister(&serdev_bus_type);
|
||||
ida_destroy(&ctrl_ida);
|
||||
}
|
||||
module_exit(serdev_exit);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue