Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267326
b: refs/heads/master
c: da4e40e
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Aug 26, 2011
1 parent dac936d commit 5122397
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 51808f051ede81865b7af351d6c230a1ac244a22
refs/heads/master: da4e40e271a30ecf8b87f70619cca93c25ed0199
7 changes: 5 additions & 2 deletions trunk/drivers/tty/serial/mrst_max3110.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ receive_chars(struct uart_max3110 *max, unsigned short *str, int len)
if (!port->state)
return 0;

tty = port->state->port.tty;
tty = tty_port_tty_get(&port->state->port);
if (!tty)
return 0;

Expand All @@ -364,8 +364,10 @@ receive_chars(struct uart_max3110 *max, unsigned short *str, int len)
}
}

if (!w)
if (!w) {
tty_kref_put(tty);
return 0;
}

for (r = 0; w; r += usable, w -= usable) {
usable = tty_buffer_request_room(tty, w);
Expand All @@ -375,6 +377,7 @@ receive_chars(struct uart_max3110 *max, unsigned short *str, int len)
}
}
tty_flip_buffer_push(tty);
tty_kref_put(tty);

return r;
}
Expand Down

0 comments on commit 5122397

Please sign in to comment.