[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20180613150859.20879-1-johan@kernel.org>
Date: Wed, 13 Jun 2018 17:08:59 +0200
From: Johan Hovold <johan@...nel.org>
To: Rob Herring <robh@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Jiri Slaby <jslaby@...e.com>, linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org, Johan Hovold <johan@...nel.org>,
stable <stable@...r.kernel.org>
Subject: [PATCH] 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@...r.kernel.org> # 4.11
Signed-off-by: Johan Hovold <johan@...nel.org>
---
drivers/tty/serdev/core.c | 1 +
1 file changed, 1 insertion(+)
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);
--
2.17.1
Powered by blists - more mailing lists