Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc6cf366 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

serdev: fix memleak on module unload



Make sure to free all resources associated with the ida on module
exit.

Fixes: cd6484e1 ("serdev: Introduce new bus for serial attached devices")
Cc: stable <stable@vger.kernel.org>	# 4.11
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 20dcff43
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);