USB: cp210x: fix port-data memory leak
authorJohan Hovold <jhovold@gmail.com>
Mon, 15 Oct 2012 13:47:20 +0000 (15:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Oct 2012 17:56:13 +0000 (10:56 -0700)
commitfa21e53e263194b744e0a5b3d5676aa31a6ef0ef
tree7df2d4fd467d9f3ef163fda0f41e81cc9f394b61
parent117d01aa6303b6b7d3383077ed2551283d1ca8a3
USB: cp210x: fix port-data memory leak

commit 4295fe7791a1b20c90cbaaa6f23f2fb94218b8a7 upstream.

Fix port data memory leak by replacing port private data with serial
private data.

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

The private data is used to store the control interface number, but as
this is the same for all ports on an interface it should be stored as
usb-serial data anyway.

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