From: Alan Cox Date: Tue, 16 Jun 2009 16:00:53 +0000 (+0100) Subject: ldisc: debug aids X-Git-Tag: v2.6.31-rc1~309^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=677ca3060c474d7d89941948e32493d9c18c52d2;p=profile%2Fivi%2Fkernel-x86-ivi.git 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); }