Thread (22 messages) 22 messages, 5 authors, 2012-08-01

Re: [PATCH 02/12] usb: fix sillies in the metro USB driver

From: Alan Cox <hidden>
Date: 2012-07-23 16:28:25
Also in: lkml

On Sun, 24 Jun 2012 23:49:22 +0200
Jiri Slaby [off-list ref] wrote:
On 06/22/2012 05:38 PM, Alan Cox wrote:
quoted
Bits noticed doing the termios conversion

Signed-off-by: Alan Cox <redacted>
---

 drivers/usb/serial/metro-usb.c |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/usb/serial/metro-usb.c b/drivers/usb/serial/metro-usb.c
index 81423f7..bad5f0c 100644
--- a/drivers/usb/serial/metro-usb.c
+++ b/drivers/usb/serial/metro-usb.c
@@ -130,20 +130,14 @@ static void metrousb_read_int_callback(struct urb *urb)
...
quoted
 	if (tty && urb->actual_length) {
 		/* Loop through the data copying each byte to the tty layer. */
 		tty_insert_flip_string(tty, data, urb->actual_length);
 
 		/* Force the data to the tty layer. */
 		tty_flip_buffer_push(tty);
+		tty_kref_put(tty);
 	}
-	tty_kref_put(tty);
This doesn't seem right. (Depends on whether tty is non-null iff
urb->actual_length is non-zero.)
Doh fixed.. queued
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help