aboutsummaryrefslogtreecommitdiff
path: root/drivers/tty/serdev
diff options
context:
space:
mode:
authorJohan Hovold2018-06-13 17:08:59 +0200
committerGreg Kroah-Hartman2018-06-28 21:34:39 +0900
commitbc6cf3669d22371f573ab0305b3abf13887c0786 (patch)
tree717497bd8219b6d293197920105533f307a37446 /drivers/tty/serdev
parent20dcff436e9fcd2e106b0ccc48a52206bc176d70 (diff)
serdev: fix memleak on module unload
Make sure to free all resources associated with the ida on module exit. Fixes: cd6484e1830b ("serdev: Introduce new bus for serial attached devices") Cc: stable <stable@vger.kernel.org> # 4.11 Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serdev')
-rw-r--r--drivers/tty/serdev/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
index df93b727e984..9e59f4788589 100644
--- a/drivers/tty/serdev/core.c
+++ b/drivers/tty/serdev/core.c
@@ -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);