From: Denis Joseph Barrow Date: Thu, 15 Jan 2009 13:31:34 +0000 (+0000) Subject: hso serial throttled tty kref fix. X-Git-Tag: v2.6.29-rc2~68 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=5839b414f9f9d2d6a471988763b61dbf85eb2dba;p=linux-2.6-omap-h63xx.git hso serial throttled tty kref fix. This patch is for Alan Cox as it related to the tty layer. Hopefully the hso driver is again relatively stable with this fix. Signed-off-by: Denis Joseph Barrow Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds --- diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index e25a58f6ff6..6478bf63f28 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -2053,8 +2053,10 @@ static int put_rxbuf_data(struct urb *urb, struct hso_serial *serial) serial->curr_rx_urb_offset; D1("data to push to tty"); while (write_length_remaining) { - if (test_bit(TTY_THROTTLED, &tty->flags)) + if (test_bit(TTY_THROTTLED, &tty->flags)) { + tty_kref_put(tty); return -1; + } curr_write_len = tty_insert_flip_string (tty, urb->transfer_buffer + serial->curr_rx_urb_offset,