diff options
author | Johan Hovold <jhovold@gmail.com> | 2012-10-25 04:29:08 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-25 12:36:58 -0400 |
commit | 40d04738491d7ac1aa708ba434ff3480ec9e1b96 (patch) | |
tree | df646d43263f63e526d05dc3d60ad114cab47fc2 /arch/tile | |
parent | b8a0055050b6294826171641b182c09f78f4cc63 (diff) |
USB: quatech2: fix port-data memory leaks
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 this also fixes memory leaks in the error path of attach where
the write urbs were not freed on errors.
Make sure all interface-data deallocation is done in release by moving
the read urb deallocation from disconnect.
Note that the write urb is killed during close so that the call in
disconnect was superfluous.
Compile-only tested.
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/tile')
0 files changed, 0 insertions, 0 deletions