]> Pileus Git - ~andy/linux/commitdiff
tty: fix the metro-usb change I messed up
authorAlan Cox <alan@linux.intel.com>
Tue, 24 Jul 2012 09:59:01 +0000 (10:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Aug 2012 19:53:30 +0000 (12:53 -0700)
Fixes the leak of a tty kref that Jiri pointed out.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/metro-usb.c

index 7ae9af6b2a54981799ea65ec94d3c433fa877358..2b0627b5fe2c357bdd8f82601001b23a04d56d97 100644 (file)
@@ -136,8 +136,8 @@ static void metrousb_read_int_callback(struct urb *urb)
 
                /* Force the data to the tty layer. */
                tty_flip_buffer_push(tty);
-               tty_kref_put(tty);
        }
+       tty_kref_put(tty);
 
        /* Set any port variables. */
        spin_lock_irqsave(&metro_priv->lock, flags);