aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorMichal Ostrowski <mostrows@watson.ibm.com>2005-07-15 06:56:33 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-15 12:54:51 -0400
commita1287ba1ba810aae1f8b81e32560d5d3bf3ff9f0 (patch)
treec16aef43738ee0bf32e3514065ad394d04980900 /drivers/char
parent6f97933d0fd13920d7d53b6e0107bb674b3a1f0b (diff)
[PATCH] rocket.c: Fix ldisc ref count handling
If bailing out because there is nothing to receive in rp_do_receive(), tty_ldisc_deref is not called. Failure to do so increases the ref count and causes release_dev() to hang since it can't get the ref count to 0. Signed-off-by: Michal Ostrowski <mostrows@watson.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/rocket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
index f463d6baa685..5b1d3680c8ab 100644
--- a/drivers/char/rocket.c
+++ b/drivers/char/rocket.c
@@ -355,7 +355,7 @@ static void rp_do_receive(struct r_port *info,
355 ToRecv = space; 355 ToRecv = space;
356 356
357 if (ToRecv <= 0) 357 if (ToRecv <= 0)
358 return; 358 goto done;
359 359
360 /* 360 /*
361 * if status indicates there are errored characters in the 361 * if status indicates there are errored characters in the
@@ -437,6 +437,7 @@ static void rp_do_receive(struct r_port *info,
437 } 437 }
438 /* Push the data up to the tty layer */ 438 /* Push the data up to the tty layer */
439 ld->receive_buf(tty, tty->flip.char_buf, tty->flip.flag_buf, count); 439 ld->receive_buf(tty, tty->flip.char_buf, tty->flip.flag_buf, count);
440done:
440 tty_ldisc_deref(ld); 441 tty_ldisc_deref(ld);
441} 442}
442 443