serdev: fix memleak on module unload
authorJohan Hovold <johan@kernel.org>
Wed, 13 Jun 2018 15:08:59 +0000 (17:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Jul 2018 13:30:47 +0000 (15:30 +0200)
commitb124a1c182fa933f579281cc650f60ac47c7026d
tree9b561f0ae8cabf3f5c7ace9dbed711845c2c7499
parent3ff8e558ba7b6f7fce1ea627c797dc03240bc40f
serdev: fix memleak on module unload

commit bc6cf3669d22371f573ab0305b3abf13887c0786 upstream.

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>
drivers/tty/serdev/core.c