From 677ca3060c474d7d89941948e32493d9c18c52d2 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 16 Jun 2009 17:00:53 +0100 Subject: ldisc: debug aids Signed-off-by: Linus Torvalds diff --git a/drivers/char/tty_ldisc.c b/drivers/char/tty_ldisc.c index 874c248..a19e935 100644 --- a/drivers/char/tty_ldisc.c +++ b/drivers/char/tty_ldisc.c @@ -207,6 +207,7 @@ static void tty_ldisc_put(struct tty_ldisc *ld) ldo->refcount--; module_put(ldo->owner); spin_unlock_irqrestore(&tty_ldisc_lock, flags); + WARN_ON(ld->refcount); kfree(ld); } -- cgit v0.10.2