]> git.baikalelectronics.ru Git - kernel.git/commit
tty: Fix leak in ti-usb
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Tue, 14 Apr 2009 13:58:11 +0000 (14:58 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 Apr 2009 15:48:50 +0000 (08:48 -0700)
commit78106b4a6ef7a154aaae38cd5f1727ddb8730b3e
tree7e9b6229de416ae0ac651eb55fb6230e1ef80fc9
parentb2c0da440921a3053190112d592ff34a6edf102b
tty: Fix leak in ti-usb

If the ti-usb adapter returns an zero data length frame (which happens)
then we leak a kref.  Found by Christoph Mair <christoph.mair@gmail.com>
who proposed a patch.  The patch here is different as Christoph's patch
didn't work for the case where tty = NULL and data arrived but Christoph
did all the hard work chasing it down.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/usb/serial/ti_usb_3410_5052.c