]> git.baikalelectronics.ru Git - kernel.git/commit
USB: keyspan_pda: fix port-data memory leak
authorJohan Hovold <jhovold@gmail.com>
Wed, 17 Oct 2012 11:35:00 +0000 (13:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Oct 2012 20:47:58 +0000 (13:47 -0700)
commit89bc537965c7cb36b093db021ad2ba110efd980a
treea3cb81a0ca06e355da92cffeba471efb1dd56699
parent4e386fb169822f3767c48f008ce7986cf2ede9ac
USB: keyspan_pda: fix port-data memory leak

Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit bcb6fcf1119586a (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 write waitqueue was initialised but never used.

Compile-only tested.

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