From: Alan Cox Date: Tue, 16 Jun 2009 16:00:53 +0000 (+0100) Subject: ldisc: debug aids X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=677ca3060c474d7d89941948e32493d9c18c52d2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ldisc: debug aids Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/tty_ldisc.c b/drivers/char/tty_ldisc.c index 874c2486c034..a19e935847b0 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); }