USB: f81232: fix port-data memory leak
authorJohan Hovold <jhovold@gmail.com>
Wed, 17 Oct 2012 11:34:56 +0000 (13:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Oct 2012 17:56:12 +0000 (10:56 -0700)
commit98ba808a0d98b7abe03543c2ddda6396d76e33ed
treeb0485cb08e80d806a77caf928fd784c2489beede
parentbb5c0c637f4f2dc8ed38f580881c40977980f031
USB: f81232: fix port-data memory leak

commit 3124d1d71d3df59d40b913b5481df58099e811d1 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/f81232.c