]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: spcp8x5: fix port-data memory leak
authorJohan Hovold <jhovold@gmail.com>
Wed, 17 Oct 2012 14:31:33 +0000 (16:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Oct 2012 17:56:13 +0000 (10:56 -0700)
commit5592d451ce00a108312bf2152bde273e8532cf8c
tree138ed71bf2ebd3976da591d3035e3174f559996b
parentfa21e53e263194b744e0a5b3d5676aa31a6ef0ef
USB: spcp8x5: fix port-data memory leak

commit bf90ff5f3b8f67e5b42df4ea4fd543f8010a2676 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.

Compile-only tested.

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