]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: keyspan_pda: fix port-data memory leak
authorJohan Hovold <jhovold@gmail.com>
Wed, 17 Oct 2012 11:35:00 +0000 (13:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Oct 2012 17:56:13 +0000 (10:56 -0700)
commitd50da5d33094e51c22433e0d14acd369657aedfa
tree97fdd8eb9e582b299dd7ceca3592306c7c9cd042
parent12ddc74e8e25107eda81aceb74e3311c1480b381
USB: keyspan_pda: fix port-data memory leak

commit 94ab71ce288921490ca857e25ad174e1921b1e29 upstream.

Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Note that the write waitqueue was initialised but never used.

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/keyspan_pda.c