USB: kobil_sct: fix port-data memory leak
authorJohan Hovold <jhovold@gmail.com>
Wed, 17 Oct 2012 11:35:02 +0000 (13:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Oct 2012 17:56:13 +0000 (10:56 -0700)
commitaf4af5941e5be633846df08359820d4c1e886fbb
treeb414910cd1e58cec8d47d320b01470033909eb12
parentd3189b39faeead89a892e8c2b1afdad0f22b6303
USB: kobil_sct: fix port-data memory leak

commit 95940a04bfe8a4d246f4ca17c6a3b00148bdead0 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/kobil_sct.c