USB: ti_usb_3410_5052: fix port-data memory leak
authorJohan Hovold <jhovold@gmail.com>
Wed, 17 Oct 2012 14:31:35 +0000 (16:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Oct 2012 17:56:13 +0000 (10:56 -0700)
commitef7c9b6a9cc09853a449a43050153cc785788d16
tree64cb5128605cb8f8546f969ac99f4bcad3613ef6
parent5592d451ce00a108312bf2152bde273e8532cf8c
USB: ti_usb_3410_5052: fix port-data memory leak

commit 51ef847df74632e7cfdf952afc3887de105b8b35 upstream.

Fix port-data memory leak by moving port data allocation and
deallocation to 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/ti_usb_3410_5052.c