Johan Hovold 80c00750f0 USB: mos7840: fix port-data memory leak
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.

Note that the indentation was kept intact using a do-while(0) in order
to facilitate review. A follow-up patch will remove it.

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-25 11:11:19 -07:00
..
2012-10-02 17:26:42 -07:00
2012-10-07 20:55:16 +09:00
2012-10-16 16:40:53 +10:00
2012-10-11 00:45:21 -07:00
2012-09-26 22:28:21 -04:00
2012-09-22 10:29:19 +01:00
2012-10-08 06:33:44 +09:00
2012-09-24 10:07:40 -07:00
2012-10-13 13:22:01 -07:00
2012-10-07 17:29:24 +09:00
2012-10-10 20:15:24 +09:00
2012-10-16 14:41:47 -04:00
2012-10-17 15:53:03 -05:00
2012-10-09 16:11:46 +09:00
2012-10-10 20:15:24 +09:00
2012-10-19 11:28:59 -07:00
2012-10-01 12:09:59 -07:00
2012-10-01 18:46:13 -07:00
2012-10-16 18:07:12 -07:00