serial: pch_uart: fix tty-kref leak in dma-rx path
authorJohan Hovold <jhovold@gmail.com>
Tue, 10 Sep 2013 10:50:50 +0000 (12:50 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 26 Oct 2013 20:06:05 +0000 (21:06 +0100)
commit4f31ab80a2bf09ea0e57c351842da1e647cfe9da
treeed4b0a77983b7661c0512303d18f0819613fc0e1
parent73449fe73fa3d46232176fe6c73702b29b6479d2
serial: pch_uart: fix tty-kref leak in dma-rx path

commit 19b85cfb190eb9980eaf416bff96aef4159a430e upstream.

Fix tty_kref leak when tty_buffer_request room fails in dma-rx path.

Note that the tty ref isn't really needed anymore, but as the leak has
always been there, fixing it before removing should makes it easier to
backport the fix.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/tty/serial/pch_uart.c