Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1287ba1 authored by Michal Ostrowski's avatar Michal Ostrowski Committed by Linus Torvalds
Browse files

[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: default avatarMichal Ostrowski <mostrows@watson.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6f97933d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -355,7 +355,7 @@ static void rp_do_receive(struct r_port *info,
		ToRecv = space;

	if (ToRecv <= 0)
		return;
		goto done;

	/*
	 * if status indicates there are errored characters in the
@@ -437,6 +437,7 @@ static void rp_do_receive(struct r_port *info,
	}
	/*  Push the data up to the tty layer */
	ld->receive_buf(tty, tty->flip.char_buf, tty->flip.flag_buf, count);
done:
	tty_ldisc_deref(ld);
}